stitches icon indicating copy to clipboard operation
stitches copied to clipboard

A Simplified Responsive Variants Api

Open Code-Victor opened this issue 3 years ago • 0 comments

When using Stitches responsive variants, I get a bit frustrated having to continually add quotes and the "@" sign. It would be better if we could do away with them and go for a simpler approach. So instead of this 👇

<Stack
  gap={{ "@sm": 2, "@md": 5, "@lg": 10 }}
  direction={{ "@sm": "column", "@lg": "row"}}
>
  <Box />
  <Box />
  <Box />
</Stack>

We can use this 👇

<Stack
  gap={{ sm: 2, md: 5, lg: 10 }}
  direction={{ sm: "column", lg: "row"}}
>
  <Box />
  <Box />
  <Box />
</Stack>

Simpler and easier on the eye

Code-Victor avatar Jan 13 '23 17:01 Code-Victor