-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4215b2d
commit e2d2492
Showing
8 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.jhlite-chip { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5px; | ||
border: 1px solid $jhlite-global-color-fill-primary-dark; | ||
border-radius: 6px; | ||
background: $jhlite-global-color-fill-light; | ||
text-align: center; | ||
|
||
&--title { | ||
padding-top: 6px; | ||
padding-bottom: 6px; | ||
text-align: center; | ||
} | ||
|
||
&--description { | ||
border-top: 1px dotted $jhlite-global-color-fill-primary-dark; | ||
padding-top: 6px; | ||
padding-bottom: 6px; | ||
font-size: 0.8em; | ||
} | ||
|
||
&.-selectable { | ||
cursor: pointer; | ||
} | ||
|
||
&.-valid-highlighted { | ||
animation: $jhlite-valid-highlight-animation; | ||
} | ||
|
||
&.-invalid-highlighted { | ||
animation: $jhlite-invalid-highlight-animation; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include chip.mixin.pug | ||
|
||
+jhlite-chip | ||
+jhlite-chip({selectable: true}) | ||
+jhlite-chip({selectable: true, validHighlighted: true}) | ||
+jhlite-chip({selectable: true, invalidHighlighted: true}) | ||
+jhlite-chip({selectable: true, extended: true}) | ||
+jhlite-chip({selectable: true, validHighlighted: true, extended: true}) | ||
+jhlite-chip({selectable: true, invalidHighlighted: true, extended: true}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## Chip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
mixin jhlite-chip(options) | ||
-const { selectable: isSelectable, validHighlighted: isValidHighlighted, invalidHighlighted: isInvalidHighlighted, extended: isExtended } = options || {}; | ||
-const selectableClass = isSelectable ? '-selectable' : null; | ||
-const validHighlightedClass = isValidHighlighted ? '-valid-highlighted' : null; | ||
-const invalidHighlightedClass = isInvalidHighlighted ? '-invalid-highlighted' : null; | ||
.jhlite-chip(class=[selectableClass, validHighlightedClass, invalidHighlightedClass]) | ||
span.jhlite-chip--title Chip title | ||
if (isExtended) | ||
.jhlite-chip--description Chip description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
extends /layout | ||
|
||
block body | ||
include chip.code.pug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters