2 ms·
A simple example with React would be anything using the rebass library (https://rebassjs.org https://rebassjs.org). You can extend its Box/Flex components or do
by crooked-v 7y ago
A simple example with React would be anything using the rebass library (https://rebassjs.org https://rebassjs.org). You can extend its Box/Flex components or do a pass-through (e.g. `({a, b, ...rest}) => <Box {...rest}>{... your stuff here ...}</Box>`), at which point when using your own component you can do `<MyComponentHere marginLeft="0.5em"/>` and have native CSS margins without embedding them into the component or into stylesheets for the component.