Created
June 26, 2024 13:29
-
-
Save PaulieScanlon/8346979cebc88ae3615d1bc8efdb476d to your computer and use it in GitHub Desktop.
Example React component with Linaria
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
// src/components/some-component/index.js | |
import styled from '@linaria/react'; | |
const SomeComponent = () => { | |
return ( | |
<ButtonLink> | |
styled link | |
</ButtonLink> | |
); | |
} | |
const ButtonLink = styled.a` | |
background: transparent; | |
border-radius: 3px; | |
border: 1px solid var(--accent-color); | |
color: var(--accent-color); | |
display: inline-block; | |
margin: 0.5rem 1rem; | |
padding: 0.5rem 0; | |
transition: all 200ms ease-in-out; | |
width: 11rem; | |
`; | |
export default SomeComponent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment