[go: nahoru, domu]

Skip to content
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

[suggestion] Grommet grid areas syntax #62

Open
Bulletninja opened this issue Aug 31, 2019 · 0 comments
Open

[suggestion] Grommet grid areas syntax #62

Bulletninja opened this issue Aug 31, 2019 · 0 comments
Labels

Comments

@Bulletninja
Copy link
Bulletninja commented Aug 31, 2019

This is just a suggestion, so feel free to close this if you consider it spam, but i think grommet's "areas" prop for the grid component is very intuitive and gives you a sense of how the whole grid is structured in one place

<Grid
  rows={['xxsmall', 'xsmall']}
  columns={['xsmall', 'small']}
  gap="small"
  areas={[
    { name: 'header', start: [0, 0], end: [1, 0] },
    { name: 'nav', start: [0, 1], end: [0, 1] },
    { name: 'main', start: [1, 1], end: [1, 1] },
  ]}
>
  <Box gridArea="header" background="brand" />
  <Box gridArea="nav" background="light-5" />
  <Box gridArea="main" background="light-2" />
</Grid>

And that it would be very nice to have it in this project. Maybe if i had the time i'd implement it myself if it makes sense for this codebase, but unfortunately i don't have it right now, so it's just a suggestion for the time being. Great project by the way.

@Bulletninja Bulletninja changed the title [suggestion [suggestion] Grommet grid areas syntax Aug 31, 2019
@azz azz added the feature label Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants