From 10763285c8ef03e2e7639ba1c49e7e9162edbf2a Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 27 Jan 2021 14:28:27 +0100 Subject: node collapsing (w/o relayouting) --- src/ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui.js') diff --git a/src/ui.js b/src/ui.js index 6b54da9..88e5b10 100644 --- a/src/ui.js +++ b/src/ui.js @@ -99,7 +99,7 @@ section.tombstone > main { `; const colors = new ColorHash({ lightness: 0.8 }); -export const Note = ({ id, type, attributedTo, published, content, smallHeader = false }) => { +export const Note = ({ id, type, attributedTo, published, content, smallHeader = false, onHide }) => { const backgroundColor = attributedTo.color || colors.hex(attributedTo.id); const username = attributedTo.name || attributedTo.preferredUsername; @@ -108,6 +108,7 @@ export const Note = ({ id, type, attributedTo, published, content, smallHeader = css={{ '--theme-header-bg': backgroundColor }} class={type === 'Tombstone' ? 'tombstone' : ''} dataset={{ id }} + onClick={onHide} > {smallHeader ?
-- cgit v1.2.3