-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add horizontal and vertical alignment options to Column (#1428)
Co-authored-by: Aram <[email protected]>
- Loading branch information
1 parent
6adbd13
commit d5a7766
Showing
14 changed files
with
322 additions
and
103 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<!-- @license CC0-1.0 --> | ||
|
||
# Row | ||
|
||
Stacks its children horizontally with gaps between them and offers alignment options. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
export const crossAlignOptions: Array<string> = ['baseline', 'center', 'end', 'start'] as const | ||
export const crossAlignOptions = ['start', 'center', 'baseline', 'end'] as const | ||
export type CrossAlign = (typeof crossAlignOptions)[number] | ||
|
||
export const mainAlignOptions: Array<string> = ['around', 'between', 'center', 'end', 'evenly'] as const | ||
// Baseline alignment doesn’t make much sense in a column. | ||
// This separate type for it clarifies its appearance in Storybook. | ||
export const crossAlignOptionsForColumn = crossAlignOptions.filter((option) => option !== 'baseline') | ||
export type CrossAlignForColumn = (typeof crossAlignOptionsForColumn)[number] | ||
|
||
export const mainAlignOptions = ['center', 'end', 'between', 'around', 'evenly'] as const | ||
export type MainAlign = (typeof mainAlignOptions)[number] |
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.