Last active
June 7, 2020 00:37
-
-
Save yudium/93ade105786c03bff131fc53e84a5fcc 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 Icon from 'react-fontawesome'; | |
import styled from 'styled-components' | |
const Container = styled.div` | |
display: flex; | |
padding: 10px 20px 6px 20px; | |
border-bottom: 1px solid ${props => props.theme.border.primary}; <--- akses dengan props.theme | |
font-size: 20px; | |
` | |
const PageName = styled.h1` | |
font-weight: bold; | |
font-size: 20px; /* we need this even parent has this same property */ | |
` | |
const Header = (props) => ( | |
<Container> | |
<PageName>Home</PageName> | |
<div className="ml-auto"> | |
<Icon name="star-half-full" /> | |
</div> | |
</Container> | |
); | |
export default Header; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment