Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

writting css with twin.macro and styled components

import tw, { css } from 'twin.macro'
// maybe import css form 'styled components'

const hoverStyles = css`
  &:hover {
    border-color: black;
    ${tw`text-black`}
  }
`
const Input = ({ hasHover }) => (
  <input css={[tw`border`, hasHover && hoverStyles]} />
)
Source by morioh.com #
 
PREVIOUS NEXT
Tagged: #writting #css #styled #components
ADD COMMENT
Topic
Name
4+3 =