const Demo = styled.div`
font-size: ${getTextSize('xl')};
padding: ${getSpace('xl')};
width: ${getDimension('240px')};
color: ${getColor('success')};
border-radius: ${getRadius('m')};
${getResponsiveSpace('margin', {
default: 'm',
'@media (min-width: 700px)': 'l',
'@media (min-width: 1200px)': 'xl',
})};
`;
One of text sizes
getTextSize('xl');
One of weights
getWeight('medium');
One of spaces | string
| number
getSpace('xl');
getSpace('40px');
getSpace(5); // 5 * 8px
string
| number
getDimension('240px');
getDimension(30); // 30 * 8px
One of colors
getColor('success');
One of radii
getRadius('m');
One of shadows
getShadow('m');
One of transitions
getTransition('fast');
Takes 2 arguments:
margin
or padding
getResponsiveSpace('padding', {
default: 'm',
'@media (min-width: 700px)': 3,
'@media (min-width: 1200px)': '40px',
});
Takes 2 arguments:
width
or height
getResponsiveDimension('width', {
default: '100%',
'@media (min-width: 700px)': '240px',
'@media (min-width: 1200px)': 40,
});
Takes media queries and text size values object, same value types as getTextSize
getResponsiveTextSize({
default: 'l',
'@media (min-width: 700px)': 'xl',
'@media (min-width: 1200px)': 'xxl',
});
Takes 2 arguments:
getResponsiveOneOf('align-items', {
default: 'start',
'@media (min-width: 700px)': 'center',
'@media (min-width: 1200px)': 'end',
});