-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: adjust responsive and spacing tokens/config
- sync token names and values with design - adjust usage in relevant components - add in spacing tokens for EDS spacing units - update snapshots
- Loading branch information
1 parent
b3bf409
commit e7fdfd4
Showing
5 changed files
with
44 additions
and
28 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 |
---|---|---|
@@ -1,29 +1,33 @@ | ||
import { Canvas, Meta } from '@storybook/blocks'; | ||
import {InlineNotificationV2 as InlineNotification} from "../../../../src"; | ||
|
||
<Meta title="Documentation/Defining Layout" /> | ||
|
||
# Layout | ||
|
||
Please refer to our documentation [on ZeroHeight](https://eds.czi.design/styleguide/s/36770/p/17f0a9-layout/b/66febf) | ||
for suggested alternatives and patterns. | ||
Layout for pages is a combination of spacing units between components, and responsive changes based on the available viewport. EDS provides | ||
configururation to use with tailwind, if desired. At the core, EDS also provides tokens to use, which align with spacing units defined in design. | ||
|
||
For more information on what TailwindCSS supplies, check out the following links: | ||
For more information on what Tailwind supplies, check out the following links: | ||
|
||
* https://tailwindcss.com/docs/columns | ||
* https://tailwindcss.com/docs/container | ||
* https://tailwindcss.com/docs/display | ||
* [Tailwind Columns](https://tailwindcss.com/docs/columns) | ||
* [Tailwind Container](https://tailwindcss.com/docs/container) | ||
* [Tailwind Display](https://tailwindcss.com/docs/display) | ||
|
||
## Spacing and alignment | ||
|
||
EDS components do not include margin properties as spacing between components should be handled primarily with | ||
EDS components do not include external margin properties as spacing between components should be handled primarily with | ||
utility classes or similar custom classes. | ||
|
||
<InlineNotification title="TODO-AH: define and document internal/external spacing tokens"/> | ||
|
||
However, it's important to be able to control spacing between components, so EDS works well with tailwind utility | ||
classes like [margin](https://tailwindcss.com/docs/margin). | ||
|
||
* [EDS Size Token Documentation](?path=/story/design-tokens-tier-1-definitions--sizes) | ||
|
||
Below, we use one of the size units to demonstrate how to use EDS sizing utility classes (with tokens). | ||
|
||
```jsx | ||
<InlineNotification title="lorem ipsum dolor sit amet" className="mb-5" /> | ||
<InlineNotification title="lorem ipsum dolor sit amet" className="mx-size-5" /> | ||
``` | ||
|
||
Just like with [standard tailwind spacing values](https://tailwindcss.com/docs/customizing-spacing), the `size-X` will correspond to those used in design, AND | ||
be available across all the documented spacing utilities. For now, we provide these along side the built-in utilities, for compatibility. |
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