-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spread: Add new layout component (#1554)
- Loading branch information
1 parent
83f0028
commit 530251f
Showing
20 changed files
with
991 additions
and
406 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
'braid-design-system': minor | ||
--- | ||
|
||
--- | ||
new: | ||
- Spread | ||
--- | ||
|
||
**Spread:** Add new layout component | ||
|
||
Introduce a new layout component, `Spread`, used to justify content with both an equally distributed and a specified minimum amount of space in between each child. | ||
|
||
**EXAMPLE USAGE:** | ||
|
||
The `Spread` component works horizontally by default: | ||
|
||
```jsx | ||
<Spread space="small" alignY="center"> | ||
<Heading level="4">Heading</Heading> | ||
|
||
<OverflowMenu label="Options"> | ||
<MenuItem>First</MenuItem> | ||
<MenuItem>Second</MenuItem> | ||
</OverflowMenu> | ||
</Spread> | ||
``` | ||
|
||
But can be switched to `vertical` via the `direction` prop: | ||
|
||
```jsx | ||
<Spread space="large" direction="vertical"> | ||
<Stack space="small"> | ||
<Heading level="4">Heading</Heading> | ||
<Text>Text</Text> | ||
</Stack> | ||
|
||
<Text size="small" tone="secondary"> | ||
Date | ||
</Text> | ||
</Spread> | ||
``` |
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
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
Oops, something went wrong.