-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improved mode toggle #24
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
const Heading = styled.h1` | ||
color: ${(props) => props.theme.headingBlue}; | ||
`; | ||
|
||
const Heading1 = ({content}) => { | ||
return ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A small thing for me I really like to remove anything not in use so could just return without the curly brackets, but maybe makes sense to leave in case we are doing some logic in here soon etc. If we removed it then could be const Heading1 = ({content}) =>
<Heading>
{content}
</Heading> Another options is since content is being used as children can use the children prop that we get in react. const Heading1 = ({children}) =>
<Heading>
{children}
</Heading>
and then to use it we just wrap around our stuff
<Heading1>some header</Heading1> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But yes let's merge and then iterate as we add more stuff :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah I think we'll come back to it anyways |
||
<Heading> | ||
{content} | ||
</Heading> | ||
) | ||
} | ||
|
||
export default Heading1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
const StyledBtn = styled.button` | ||
background-color: ${props => props.theme.headingBlue}; | ||
color: white; | ||
border: none; | ||
padding: 6px 6px; | ||
margin: 16px 0px; | ||
border-radius: 6px; | ||
/* max-width: 90px; */ | ||
min-width: 90px; | ||
box-shadow: 1px 1px 10px 2px rgba(0, 0, 0, 7%); | ||
transition: all 0.2s ease; | ||
|
||
&:hover{ | ||
box-shadow: 1px 1px 10px 4px rgba(0, 0, 0, 22%); | ||
} | ||
` | ||
|
||
const PrimaryBtn = ({content}) => { | ||
return ( | ||
<StyledBtn> | ||
{content} | ||
</StyledBtn> | ||
) | ||
} | ||
|
||
export default PrimaryBtn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhh yeaaaaa !