-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(hairline-divider): Add styles for 4 different options
- Loading branch information
Showing
5 changed files
with
61 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
``` | ||
<HairlineDivider /> | ||
<div> | ||
<HairlineDivider /> | ||
<br/> | ||
<HairlineDivider gradient={true} /> | ||
</div> | ||
``` | ||
|
||
``` | ||
<div style={{height: '100px'}}> | ||
<HairlineDivider vertical={true} /> | ||
</div> | ||
``` | ||
|
||
``` | ||
<div style={{height: '100px'}}> | ||
<HairlineDivider vertical={true} gradient={true} /> | ||
</div> | ||
``` |
38 changes: 22 additions & 16 deletions
38
src/components/Dividers/HairlineDivider/HairlineDivider.modules.scss
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 |
---|---|---|
@@ -1,32 +1,38 @@ | ||
@import '../../../scss/settings/colours'; | ||
|
||
.horizontal { | ||
|
||
.base { | ||
composes: noSpacing from '../../Spacing/Spacing.modules.scss'; | ||
border: none; | ||
} | ||
|
||
.vertical { | ||
composes: noSpacing from '../../Spacing/Spacing.modules.scss'; | ||
|
||
width: 1px; | ||
.verticalHeight { | ||
height: 100%; | ||
} | ||
|
||
border: none; | ||
.horizontalThin { | ||
composes: base; | ||
|
||
border-left: 1px solid; | ||
border-color: $color-gainsboro; | ||
border-top: 1px solid $color-gainsboro; | ||
} | ||
|
||
.thin { | ||
border: none; | ||
.verticalThin { | ||
composes: base; | ||
composes: verticalHeight; | ||
|
||
border-top: 1px solid; | ||
border-color: $color-gainsboro; | ||
border-left: 1px solid $color-gainsboro; | ||
} | ||
|
||
.gradient { | ||
border: none; | ||
height: 1px; | ||
.horizontalGradient { | ||
composes: base; | ||
|
||
height: 1px; | ||
background-image: linear-gradient(90deg, rgba(216, 216, 216, 0) 0%, $color-gainsboro 2%, $color-gainsboro 98%, rgba(216, 216, 216, 0) 100%); | ||
} | ||
|
||
.verticalGradient { | ||
composes: base; | ||
composes: verticalHeight; | ||
|
||
width: 1px; | ||
background-image: linear-gradient(180deg, rgba(216, 216, 216, 0) 0%, $color-gainsboro 5%, $color-gainsboro 95%, rgba(216, 216, 216, 0) 100%); | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
exports[`HairlineDivider renders 1`] = ` | ||
<hr | ||
class="horizontal thin" | ||
class="horizontalThin" | ||
/> | ||
`; |