Skip to content

Instantly share code, notes, and snippets.

@skflowne
Last active August 19, 2020 14:30
Show Gist options
  • Save skflowne/ae1974123f08a241397fd7aab8f5a6ed to your computer and use it in GitHub Desktop.
Save skflowne/ae1974123f08a241397fd7aab8f5a6ed to your computer and use it in GitHub Desktop.
import React from "react"
import styled from "styled-components"
// styled component
const StyledButton = styled("button")`
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: center;
background-color: #4299e1;
color: #bee3f8;
padding: 0.75rem 1.5rem;
outline: none;
border: none;
font-size: 1rem;
cursor: pointer;
&:hover {
background-color: #63b3ed;
color: #ebf8ff;
}
`
// actual button component
const Button = ({ children, ...props }) => {
return <StyledButton {...props}>{children}</StyledButton>
}
export default Button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment