Skip to content

Instantly share code, notes, and snippets.

@man-person
Created May 18, 2021 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save man-person/65a99202bee1311c28b0d47fafaea773 to your computer and use it in GitHub Desktop.
Save man-person/65a99202bee1311c28b0d47fafaea773 to your computer and use it in GitHub Desktop.
strip input with material-like focus effect
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