-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Primitives] HGrid #1838
[Primitives] HGrid #1838
Conversation
🦋 Changeset detectedLatest commit: 894804a The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
d6974a7fa | 48 komponenter | 307 stories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Det var ikke intuitivt for meg at sidespalten i 'Page Layout' og 'Static Sidebar' skjules helt fra breakpoint MD og nedover. Hvor i komponentene styres dette?
Var satt opp separat i storybook for et mer "relaistisk" scenario, men for komponenten sin demo er det kanskje mer forvirrende. Kan fjerne det fra demoen.
|
Co-authored-by: Halvor Haugan <[email protected]>
const Example = () => { | ||
return ( | ||
<Background> | ||
<HGrid gap="6" columns={3}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dette er vel mest pga ingen text "content" == auto velger minimum width == 0px? (sikkert noe slikt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jepp, vil funke på aksel.nav.no uten width siden jeg bruker denne snippeten
export default withDsExample(Example, "static");
der static lar grid bruke hele bredden som er tilgjengelig
https://dev.to/nayaabkhan/essential-layout-components-for-your-design-system-26p
Basert på braid, mesh og polaris sin "layout-primitive" Columns.
HGrid
er en enklere og mer fleksibel måte å sette opp layout på vs det klassiske griddet. Man trenger ikke å forholde seg til 6/8/12 statiske kolonner basert på brekkpunkt, men larHGrid
bestemme hvordan children skal være fordelt medgrid-template-columns
Komponenten er ment som en utility som lett lar bruker bygge opp sider basert på våre definerte brekkpunkt og spacing-verdier. Forhåpentligvis vil denne kunne settes sammen med en
Page
,Frame
,Layout
eller lignende for å bygge opp enkle sidemaler i fremtiden og som da styrer gutter-margin/sentrering/max-width.