glamorous-pseudo
Install
npm install -S glamorous-pseudo
Basic Usage
<Pseudo
after={{ content: '" after"', color: 'red' }}
before={{ content: '"before "', color: 'green' }}
focus={{ color: 'blue' }}
hover={{ color: 'purple' }}
active={{ fontSize: '0.8em' }}
visited={{ color: '#5EDA7E' }}
display="block"
width={300}
textAlign="center"
>
<h1>Hello</h1>
</Pseudo>
// Create your own ui library
const A = (props) => <Pseudo {...props} component={glamorous.A} />
<A
hover={{ color: '#a9e34b' }}
href="https://startup.com"
>
Startup
</A>
Props
GlamorousComponent
component glamorous.Div, glamorous.A, glamorous.Span, ...
Any props passed to Pseudo
will be passed through to component
object
after :after
styles
object
before :before
styles
object
focus :focus
styles
object
hover :hover
styles
object
active :active
styles
object
visited :visited
styles