-
Notifications
You must be signed in to change notification settings - Fork 495
Open
Labels
Description
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 of space. 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?
const config = {
spacing: {
property: 'spacing',
scale: 'space',
}
}
config.space = config.spacing;
const customSystemProps = system(config)
// Elsewhere in the module, the customSystemProps is composed along with other functions imported from `styled-system`
const styleFunctions = [
background,
border,
color,
flexbox,
layout,
position,
shadow,
typography,
customSystemProps,
];
const styleProps = compose(...styleFunctions);
export const Base: React.FunctionComponent<BoxProps> = styled('div', {
shouldForwardProp,
})({ boxSizing: 'border-box' }, (props: BaseProps) => ({
...styleProps(props),
// etc.
})) as React.FunctionComponent<BoxProps>;