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
Using an alias key name for space
#2098
Comments
space
space
I was a little confused by the example snippet in your documentation, so I also tried const config = {
space: {
property: 'space',
scale: 'space',
}
}
config.spacing = config.space;
const customSystemProps = system(config) |
I have a feeling the reason it’s not working is because
Is this approach possible? I don't think |
It might help to know what the intended API is for your components. Based on your first example it looks like the If your goal is to have these new tokens be used as the argument for the style props like margin and padding, you can use an object for const theme = {
// We prefer the array at our organization
// space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
space: {
spacing0: 0,
spacing1: 4,
spacing2: 8,
...
}
...
}
<Box
mb={"spacing1")
p={"spacing3"}
// mb={1}
// p={4}
/> Hope that helps some. |
Hello! Our design team is rolling out a new naming convention for our design tokens. One of the changes requires space tokens to use the
spacing
prefix instead ofspace
. I'm trying to configure an alias based on the code snippet in your documentation, but it hasn't been successful for me yet.Is there anything we're missing in the way we're configuring our alias?
The text was updated successfully, but these errors were encountered: