refract: cleanup

This commit is contained in:
cv
2021-04-10 11:29:42 +02:00
parent dcd818085f
commit f06bbc668d
7 changed files with 47 additions and 39 deletions
@@ -3,6 +3,7 @@ import { AddIcon, MinusIcon } from '@chakra-ui/icons';
import style from './List.module.css';
export default function BlockBlock(props) {
const { eventsHandler, index, data } = props;
return (
<div className={style.blockContainer}>
<div className={style.actionOverlay}>
@@ -10,13 +11,15 @@ export default function BlockBlock(props) {
size='xs'
icon={<MinusIcon />}
colorScheme='red'
onClick={() => props.deleteEvent(props.index)}
onClick={() => eventsHandler('delete', data.id)}
/>
<IconButton
size='xs'
icon={<AddIcon />}
colorScheme='blue'
onClick={() => props.createEvent(props.index)}
onClick={() =>
eventsHandler('add', { type: 'event', order: index + 1 })
}
/>
</div>
</div>