Last active
May 4, 2020 05:20
-
-
Save LarryKarani/13c6546b52d2ee20190d6790621c53ae 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, { ThemeProvider } from 'styled-componets'; | |
const theme = { | |
text: '#ffff', | |
dark: '#0000' | |
} | |
const CustomButton = styled.button` | |
background-color: ${props => props.theme.dark}; | |
color: ${ props => props.theme.text}; | |
cursor: pointer; | |
font-size: 16px; | |
border-radius: 3px; | |
border: 2px solid palevioletred; | |
margin: 0 1em; | |
padding: 0.25em 1em; | |
` | |
const App = () => { | |
return ( | |
<div> | |
<h1> Stlyed Button </h1> | |
<ThemeProvider theme={theme}> | |
<CustomButton>Themed button </CustomButton> | |
</ThemeProvider> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment