-
Notifications
You must be signed in to change notification settings - Fork 2
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
617555f
commit e769759
Showing
3 changed files
with
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import styled from 'styled-components'; | ||
import { Variant } from 'lib/types'; | ||
|
||
const map = (properties: Variant) => ({ | ||
'data-variant': properties.variant || 'default', | ||
}); | ||
|
||
export const Separator = styled.div.attrs(map)` | ||
width: 100%; | ||
border-top: var(--woly-border-width) solid var(--woly-canvas-disabled); | ||
margin: calc(3px - (var(--woly-border-width) / 2)) 0; | ||
`; |
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,41 @@ | ||
--- | ||
name: separator | ||
category: atoms | ||
package: 'woly' | ||
--- | ||
|
||
import { Playground, block } from 'box-styles' | ||
import { Heading, Input, Separator } from 'ui' | ||
|
||
`Sepatator` is a line that divides blocks or content. | ||
|
||
### Example | ||
|
||
<Playground direction="vertical"> | ||
<div style={{ width: '300px' }}> | ||
<div style={{ margin: '18px 0' }}> | ||
<Heading size={2}>User List</Heading> | ||
</div> | ||
<Separator variant="primary" /> | ||
<Input | ||
type="text" | ||
name="name" | ||
placeholder="Search" | ||
onChange={() => console.info('On input change')} | ||
variant="primary" | ||
style={{ margin: '10px 0' }} | ||
/> | ||
</div> | ||
</Playground> | ||
|
||
### Kinds | ||
|
||
| Name | Description | | ||
| ----------- | -------------- | | ||
| `Separator` | Base separator | | ||
|
||
### Props | ||
|
||
| Name | Type | Default | Description | | ||
| --------- | -------- | ----------- | ----------------------------------------- | | ||
| `variant` | `string` | `'default'` | Variant prop to style Separator component | |