Created
May 18, 2021 15:39
-
-
Save man-person/65a99202bee1311c28b0d47fafaea773 to your computer and use it in GitHub Desktop.
strip input with material-like focus effect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StyledCardElementContainer = styled.div<{ isfocused: string }>` | |
border-bottom: 0.5px solid gray; | |
padding: 6px; | |
height: 33px; | |
::after { | |
content: ""; | |
position: absolute; | |
width: 0px; | |
height: 2px; | |
background: #7f43ff; | |
transition: all .25s; | |
margin: 6px 20px 0 20px; | |
left: 46%; | |
} | |
${props => props.isfocused === 'true' | |
? | |
':after {' + | |
'width: 92%;' + | |
'height: 2px;' + | |
'left: 0;' + | |
'}' | |
: ''} | |
&:hover { | |
border-bottom: 2px solid #7f43ff88; | |
} | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment