1
0
mirror of https://github.com/yldio/copilot.git synced 2025-01-10 02:50:11 +02:00
copilot/ui/src/components/add-metric/tile.js

70 lines
1.2 KiB
JavaScript
Raw Normal View History

const React = require('react');
const Styled = require('styled-components');
const constants = require('../../shared/constants');
2017-02-15 03:19:26 +02:00
const composers = require('../../shared/composers');
const fns = require('../../shared/functions');
const {
boxes,
breakpoints,
colors
} = constants;
2017-02-15 03:19:26 +02:00
const {
Baseline
} = composers;
const {
remcalc
} = fns;
const {
default: styled
} = Styled;
const spacing = remcalc(24);
const StyledTile = styled.div`
position: relative;
display: inline-block;
box-sizing: border-box;
margin: 0 ${spacing} ${spacing} 0;
padding: ${spacing};
width: ${remcalc(300)};
height: ${remcalc(247)};
box-shadow: ${boxes.bottomShaddow};
border: ${remcalc(1)} solid ${colors.base.grey};
background-color: ${colors.base.white};
${breakpoints.small`
width: ${remcalc(300)};
height: ${remcalc(247)};
`}
${breakpoints.medium`
width: ${remcalc(300)};
height: ${remcalc(247)};
`}
${breakpoints.large`
width: ${remcalc(300)};
height: ${remcalc(247)};
`}
`;
const Tile = ({
children
2017-02-15 03:19:26 +02:00
}) => (
<StyledTile name='add-metric-tile'>
{children}
</StyledTile>
);
Tile.propTypes = {
children: React.PropTypes.node
};
2017-02-15 03:19:26 +02:00
module.exports = Baseline(
Tile
);