cleanup unused css

This commit is contained in:
cv
2021-04-10 22:45:35 +02:00
parent 54d19d729b
commit 4271b27686
5 changed files with 135 additions and 202 deletions
@@ -0,0 +1,116 @@
/* ============= COMMON ============= */
.eventRow,
.eventRowActive,
.block,
.delay {
position: relative;
top: 1em;
margin: 0.2em 0;
width: 100%;
border-radius: 8px;
font-size: 15px;
}
.block,
.delay {
padding: 0.2em 1em;
color: white;
box-sizing: border-box;
display: flex;
margin: auto;
gap: 1em;
}
.actionOverlay {
display: flex;
flex-direction: row;
gap: 0.5em;
align-content: center;
align-self: center;
opacity: 0.6;
transition: linear 0.1s;
}
.actionOverlay:hover {
opacity: 1;
}
/* ============= EVENT ITEM ============= */
.eventRow,
.eventRowActive {
padding: 0.2em 0.5em;
padding-left: 1em;
display: grid;
grid-template-columns: auto auto 3em 1fr auto;
justify-content: center;
align-content: center;
align-items: baseline;
gap: 0.5em;
}
.eventRow {
background-color: #0001;
border-top: 2px solid #0001;
border-bottom: 2px solid #0001;
}
.eventRowActive {
background-color: #b2f5eaaa;
border-top: 2px solid #b2f5ea;
border-bottom: 2px solid #b2f5ea;
}
.titleContainer,
.detailedContainer {
background-color: #fff8;
border: 1px solid #0001;
border-radius: 4px;
}
.rowDetailed {
display: inline-flex;
position: relative;
}
.titleContainer,
.detailedContainer {
width: 90%;
display: block;
}
.more {
position: absolute;
right: 0.25em;
top: 0.5em;
}
/* ============= BLOCK BLOCK ============= */
.block {
background-color: #805ad5aa;
height: 3em;
border: 1px solid #0001;
border-bottom: 8px solid #805ad5;
flex-direction: row-reverse;
}
/* ============= DELAY BLOCK ============= */
.delay {
background-color: #ecc94baa;
border: 1px solid #0001;
border-top: 4px solid #ecc94b;
}
.delayValue {
color: #000;
background-color: #fff5;
border-radius: 4px;
padding: 0.2em;
text-align: center;
width: 6em;
border: 1px solid #0001;
}
+14 -16
View File
@@ -1,26 +1,24 @@
import { IconButton } from '@chakra-ui/button';
import { AddIcon, MinusIcon } from '@chakra-ui/icons';
import style from './List.module.css';
import AddIconBtn from '../../../common/components/buttons/AddIconBtn';
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
import style from './Block.module.css';
export default function BlockBlock(props) {
const { eventsHandler, index, data } = props;
const addHandler = () => {
eventsHandler('add', { type: 'block', order: index + 1 });
};
const deleteHandler = () => {
eventsHandler('delete', data.id);
};
return (
<div className={style.blockContainer}>
<div className={style.block}>
<div className={style.actionOverlay}>
<IconButton
size='xs'
icon={<MinusIcon />}
colorScheme='red'
onClick={() => eventsHandler('delete', data.id)}
/>
<IconButton
size='xs'
icon={<AddIcon />}
colorScheme='blue'
onClick={() =>
eventsHandler('add', { type: 'event', order: index + 1 })
}
/>
<DeleteIconBtn clickHandler={deleteHandler} />
<AddIconBtn clickHandler={addHandler} />
</div>
</div>
);
@@ -9,6 +9,9 @@ import {
} from '@chakra-ui/slider';
import { useEffect, useState } from 'react';
import style from './List.module.css';
import AddIconBtn from '../../../common/components/buttons/AddIconBtn';
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
import style from './Block.module.css';
export default function DelayBlock(props) {
const [delay, setDelay] = useState(0);
@@ -39,6 +42,7 @@ export default function DelayBlock(props) {
return (
<div className={style.delayContainer}>
<div className={style.delay}>
<div className={style.delayValue}>{`${delay} min`}</div>
<Slider
defaultValue={data.timerDuration}
@@ -1,5 +1,4 @@
import { FiChevronDown, FiChevronUp } from 'react-icons/fi';
import { Editable, EditablePreview, EditableInput } from '@chakra-ui/react';
import { useState } from 'react';
import AddIconBtn from '../../../common/components/buttons/AddIconBtn';
import BlockIconBtn from '../../../common/components/buttons/BlockIconBtn';
@@ -7,7 +6,7 @@ import DelayIconBtn from '../../../common/components/buttons/DelayIconBtn';
import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
import EventTimes from '../../../common/components/eventTimes/EventTimes';
import { showErrorToast } from '../../../common/helpers/toastManager';
import style from './List.module.css';
import style from './Block.module.css';
import EditableText from '../../../common/input/EditableText';
export default function EventBlock(props) {
@@ -1,184 +0,0 @@
/* ============= EVENT LIST ============= */
.eventContainer {
}
/* ============= EVENT ITEM ============= */
.eventRow,
.eventRowActive {
margin: 0.2em 0;
padding: 0.2em 0.5em;
position: relative;
top: 1em;
left: 0;
width: 100%;
display: grid;
grid-template-columns: auto 5em 1fr auto;
padding-left: 1em;
gap: 0.5em;
justify-content: center;
align-content: center;
align-items: baseline;
border-radius: 8px;
font-size: 15px;
}
.eventRow {
background-color: #0001;
border-top: 2px solid #0001;
border-bottom: 2px solid #0001;
}
.eventRowActive {
background-color: #b2f5eaaa;
border-top: 2px solid #b2f5ea;
border-bottom: 2px solid #b2f5ea;
}
.arm,
.armActive {
width: 18px;
height: 18px;
border-radius: 10px;
cursor: pointer;
}
.arm {
background-color: #888;
border: 1px solid #444;
}
.armActive {
background: radial-gradient(
circle,
rgba(22, 255, 0, 1) 0%,
rgba(50, 255, 31, 1) 49%,
rgba(0, 0, 0, 1) 65%,
rgba(0, 255, 156, 0.7083333333333333) 81%
);
border: 1px solid #256e62;
}
.time,
.titleContainer,
.detailedContainer {
background-color: #fff8;
border: 1px solid #0001;
border-radius: 3px;
}
.time {
width: 5em;
height: fit-content;
}
.rowDetailed {
display: inline-flex;
position: relative;
}
.titleContainer,
.detailedContainer {
width: 90%;
display: block;
}
.detailedContainer > div,
.titleContainer > div {
display: inline;
}
.detailedTitle,
.detailedTitleUnderlined {
padding-left: 1em;
font-size: 0.8em;
color: #888;
display: inline-block;
width: 6em;
cursor: default;
}
.detailedTitleUnderlined {
border-bottom: 1px solid #0001;
}
.more {
position: absolute;
right: 0.25em;
top: 0em;
}
.actionOverlay {
display: flex;
flex-direction: row;
gap: 0.5em;
align-content: center;
align-self: center;
opacity: 0.6;
transition: linear 0.1s;
}
.eventRow:hover > .actionOverlay {
opacity: 0.9;
transition: linear 0.1s;
}
.actionOverlay:hover {
opacity: 1;
}
/* ============= DELAY BLOCK ============= */
.delayContainer {
position: relative;
top: 1em;
margin: 0.2em 0;
padding: 0.2em 1em;
background-color: #ecc94baa;
border-radius: 8px;
color: white;
border: 1px solid #0001;
border-top: 4px solid #ecc94b;
box-sizing: border-box;
width: 100%;
display: flex;
margin: auto;
gap: 1em;
}
.delayValue {
color: #000;
background-color: #fff5;
border-radius: 4px;
padding: 0.2em;
text-align: center;
width: 6em;
border: 1px solid #0001;
}
.delayedEditable {
background-color: #ecc94b55;
}
/* ============= BLOCK BLOCK ============= */
.blockContainer {
position: relative;
top: 1em;
margin: 0.2em 0;
padding: 0.2em 1em;
width: 100%;
background-color: #805ad5aa;
border-radius: 8px;
color: white;
height: 3em;
border: 1px solid #0001;
border-bottom: 8px solid #805ad5;
box-sizing: border-box;
width: 100%;
display: flex;
flex-direction: row-reverse;
margin: auto;
gap: 1em;
}