Package Exports
- @styled-system/css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@styled-system/css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@styled-system/css
Overload style objects with theme-aware Styled System props
npm i @styled-system/cssimport styled from '@emotion/styled'
import css from '@styled-system/css'
const Beep = styled(
css({
fontSize: [ 4, 5, 6 ],
color: 'primary',
bg: 'gray',
'&:hover': {
color: 'secondary',
},
})
)// usage with the css prop
import React from 'react'
import css from '@styled-system/css'
const Boop = props =>
<div
{...props}
css={css({
fontSize: [4, 5, 6],
color: 'primary',
})}
/>Props
When using @styled-system/css with styled components,
Styled System props can be used on the resulting component.
<Beep
color='primary'
bg='black'
/>The following style props will be available on the component:
fontFamilyfontSizefontWeightlineHeightcolorbgmmtmrmbmlmxmypptprpbplpxpy
MIT License