0.7.0 • Published 4 years ago

@lightmode/sx v0.7.0

Weekly downloads
13
License
-
Repository
-
Last release
4 years ago

@lightmode/sx

This helper function creates a jsx pragma the enables the Styled System/Theme UI sx prop with a theme and without any provider.

Create your jsx pragma like so:

import { makePragma } from '@lightmode/sx';
import theme from './theme';

const jsx = makePragma(theme);

export default jsx;
export { jsx };

Then use it like the jsx prop from Theme UI but import your own file:

/** @jsx jsx */
import { jsx } from '../util/jsx';

The raw css prop is not supported. An interesting possibilty of this approach (not yet implemented) is providing full typescript support, including custom theme values.

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago