Skip to content

Instantly share code, notes, and snippets.

@yudium
Last active June 7, 2020 00:37
Show Gist options
  • Save yudium/93ade105786c03bff131fc53e84a5fcc to your computer and use it in GitHub Desktop.
Save yudium/93ade105786c03bff131fc53e84a5fcc to your computer and use it in GitHub Desktop.
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