Starting to add an onToggleCards prop.

This commit is contained in:
Evelyn Eastmond committed 2019-05-07 11:42:40 -04:00
1 parent b77bc7a8b4
commit 96bd677ef9
1 file changed
+6 -1
+6 -1
View File
@@ -42,7 +42,10 @@ const CardHeader = ({onCloseCards, onShowAll, totalSteps, step}) => (
</div>
) : null}
<div className={styles.headerButtonsRight}>
<div className={styles.shrinkButton}>
<div
className={styles.shrinkButton}
onClick={onToggleCards}
>
{'Shrink'}
</div>
<div
@@ -264,6 +267,7 @@ const Cards = props => {
totalSteps={steps.length}
onCloseCards={onCloseCards}
onShowAll={onShowAll}
onToggleCards={onToggleCards}
/>
<div className={styles.stepBody}>
{steps[step].deckIds ? (
@@ -324,6 +328,7 @@ Cards.propTypes = {
onPrevStep: PropTypes.func.isRequired,
onShowAll: PropTypes.func,
onStartDrag: PropTypes.func,
onToggleCards: PropTypes.func.isRequired,
step: PropTypes.number.isRequired,
x: PropTypes.number,
y: PropTypes.number