Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created June 26, 2024 13:29
Show Gist options
  • Save PaulieScanlon/8346979cebc88ae3615d1bc8efdb476d to your computer and use it in GitHub Desktop.
Save PaulieScanlon/8346979cebc88ae3615d1bc8efdb476d to your computer and use it in GitHub Desktop.
Example React component with Linaria
// 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