-
-
Save zivanovicb/c338794a97780d156b35ef2164c5da03 to your computer and use it in GitHub Desktop.
React rounded button reusable component
This file contains 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
import React from 'react'; | |
import styled from 'styled-components'; | |
const RoundedButton = styled.button` | |
padding:1.15em 2.5em; | |
font-size:0.8em; | |
font-weight:${props => props.weight}; | |
color:${props => props.color}; | |
background:${props => props.background || 'white'}; | |
border:0; | |
border-radius:${props => props.borderRadius || '150px'}; | |
transition:all 0.08s ease-in-out; | |
cursor:pointer; | |
:hover{ | |
color:${props => props.hoverColor || 'white'}; | |
background:${props => props.hoverBackground || props.theme.green}; | |
} | |
`; | |
export default RoundedButton; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment