import React, { useState } from 'react'; import { Clipboard } from '~/clipboard'; const styles = { transitionsWrapper: { display: 'flex', flexDirection: 'column' as 'column', }, transitionsBox: { cursor: 'pointer', height: '6rem', width: '13rem', padding: '.5rem', display: 'flex', flexDirection: 'column' as 'column', justifyContent: 'center', alignItems: 'center', border: '1px solid #FFF', borderRadius: '0.375rem', boxShadow: '0 25px 50px -12px rgba(0, 0, 0, 0.25)', backgroundColor: '#6366F1', }, }; const TransitionBox = ({ value }: { value: string; key: any }) => { const [pressed, setPressed] = useState(false); return (
setPressed(!pressed)} style={{ ...styles.transitionsBox, transition: `all ${value} ease 0s`, marginLeft: `${pressed ? 20 : 0}rem`, }} > {`${value}`.trim().replace(/var\(|\)/gi, '')}
); }; export const TransitionShowcases = ({ values }) => (
{values.map((value) => ( ))}
);