Skip to content

Instantly share code, notes, and snippets.

@Damkols
Created June 13, 2022 16:35
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 Damkols/744b178c8373b8d241fcafb011d9b374 to your computer and use it in GitHub Desktop.
Save Damkols/744b178c8373b8d241fcafb011d9b374 to your computer and use it in GitHub Desktop.
// components/Button.js
import styled from "styled-components";
const StyledButton = styled.button`
border: 2px solid green;
background-color: ${(props) => (props.variant === "outline" ? "white" : "green")};
color: ${(props) => (props.variant === "outline" ? "green" : "white")};
padding: 15px 32px;
text-align: center;
text-decoration: none;
font-size: 16px;
cursor: pointer;
`;
export default StyledButton;
// BlueButton styling
export const BlueButton = styled(StyledButton)`
background-color: blue;
border: none;
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment