feat: events have note field

This commit is contained in:
cv
2021-05-06 14:31:28 +02:00
parent 72b42c7eb8
commit 1d0c819e5a
2 changed files with 13 additions and 2 deletions
@@ -9,7 +9,7 @@
}
.titleUnderlined {
border-bottom: 1px solid rgba(255, 255, 255, 0.35);
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.block {
@@ -23,7 +23,7 @@ const areEqual = (prevProps, nextProps) => {
const EventBlock = (props) => {
const { data, selected, next, delay, index, eventsHandler } = props;
const [more, setMore] = useState(false);
const [more, setMore] = useState(true);
const [visible, setVisible] = useState(data.isPublic || false);
// Set visibility indicator
@@ -69,6 +69,10 @@ const EventBlock = (props) => {
updateValues('presenter', v);
};
const handleNoteSubmit = (v) => {
updateValues('note', v);
};
const handleVisibleToggle = () => {
let viz = !data.isPublic || !visible;
updateValues('isPublic', viz);
@@ -119,6 +123,13 @@ const EventBlock = (props) => {
submitHandler={handleSubtitleSubmit}
underlined
/>
<EditableText
label='note'
defaultValue={data.note}
placeholder='Add note'
submitHandler={handleNoteSubmit}
underlined
/>
</div>
) : (
<div className={style.titleContainer}>