Last active
June 4, 2020 16:21
-
-
Save jamiejohnsonkc/7fc31b8c93d7ee3d406abeaa8977ee0f to your computer and use it in GitHub Desktop.
For shorthand properties or ones not automaically mapped to values in the theme, use an inline function to reference values from the theme object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** @jsx jsx */ | |
| import { jsx } from 'theme-ui' | |
| export default props => ( | |
| <div | |
| {...props} | |
| sx={{ | |
| boxShadow: theme => `0 0 4px ${theme.colors.primary}`, | |
| }} | |
| /> | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment