Answers for "styled components conditional hover"

1

styled components conditional hover

import { css, styled } from 'styled-components'

styled.div`
   ${props => props.shouldHover && css`
      &:hover {
        background: 'red';
      }
   `}
`
Posted by: Guest on May-29-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language