Skip to content

Instantly share code, notes, and snippets.

@zivanovicb
Created July 8, 2017 21:14
Show Gist options
  • Save zivanovicb/c338794a97780d156b35ef2164c5da03 to your computer and use it in GitHub Desktop.
Save zivanovicb/c338794a97780d156b35ef2164c5da03 to your computer and use it in GitHub Desktop.
React rounded button reusable component
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