ts-styled-components
v0.0.1
Published
typescript styled components generic utils
Downloads
4
Maintainers
Readme
ts-styled-components
Using typescript interface in styled-components
Usage
Install
npm i ts-styled-components --save
yarn add ts-styled-components
Usage
import withProps from 'ts-styled-components'
interface IProps {
isTest: boolean,
}
const styles = {
containers: withProps<IProps>()(styled.view)`
width: ${(props) => props.isTest ? '600' : '200' }px;
`
};