Created
May 2, 2020 10:31
-
-
Save LarryKarani/5b10dfdbe8d2e22e26d19140e3e4ee2f to your computer and use it in GitHub Desktop.
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-componets'; | |
const Button = styled.button` | |
background: ${props => props.primary ? 'blue': 'white'}; | |
color: ${props => props.primary ? 'white' : 'green} | |
cursor: pointer; | |
font-size: 16px; | |
border-radius: 3px; | |
border: 2px solid palevioletred; | |
margin: 0 1em; | |
padding: 0.25em 1em; | |
transition: 0.5s all ease-out; | |
&:hover { | |
background-color: palevioletred; | |
color: white; | |
} | |
` | |
const App = () => { | |
return ( | |
<div> | |
<h1> Stlyed Button </h1> | |
<Button>Custom button</Button> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment