triplebyte-react-spa/components/card.js
2020-02-19 02:00:21 -05:00

26 lines
641 B
JavaScript

import React from 'react';
import CardMover from 'components/cardMover';
export default ({ text = 'No text', moveLeft, moveRight }) => {
return <>
<div className='card'>
{ moveLeft && <CardMover direction='left' action={moveLeft} /> }
<div className='text'>
{ text }
</div>
{ moveRight && <CardMover direction='right' action={moveRight} /> }
</div>
<style jsx>{`
.card {
display: flex;
flex-direction: row;
margin-bottom: 6px;
background-color: white;
}
.text {
flex-grow: 1;
padding: 14px 12px;
}
`}</style>
</>;
}