Last active
August 1, 2017 20:16
-
-
Save aga5tya/8f3ef8a44cf1a5bc498dbf7ea14d44b1 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 PropTypes from 'prop-types' | |
import { createComponent } from 'react-fela' | |
const __DateContainer = () => ({ | |
'text-align': 'center', | |
width: '70px', | |
'line-height': '18px', | |
'& ._month': { | |
'font-size': '12px', | |
'font-weight': 'bold', | |
color: '#4CD9AA' | |
}, | |
'& ._date': { | |
'font-size': '18px', | |
'font-weight': 'bold', | |
color: '#333333' | |
}, | |
'& ._day': { | |
'font-size': '12px', | |
'font-weight': '500', | |
color: '#333333' | |
} | |
}) | |
const DateContainer = props => { | |
return ( | |
<div> | |
<div className="_month"> | |
{props.month} | |
</div> | |
<div className="_date"> | |
{props.date} | |
</div> | |
<div className="_day"> | |
{props.day} | |
</div> | |
</div> | |
) | |
} | |
DateContainer.propTypes = { | |
month: PropTypes.string, | |
date: PropTypes.string, | |
day: PropTypes.string | |
} | |
const StyledDateContainer = createComponent(__DateContainer, DateContainer) | |
export const Wrapper = () => { | |
return ( | |
<div> | |
<StyledDateContainer | |
{...{ | |
month: 'JAN', | |
date: '29', | |
day: 'Tue' | |
}} | |
/> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment