aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.js
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2021-01-27 13:28:27 +0000
committers-ol <s-ol@users.noreply.github.com>2021-01-27 13:28:27 +0000
commit10763285c8ef03e2e7639ba1c49e7e9162edbf2a (patch)
tree6ffb629cc2031f1092f9cef692a244b19032ae75 /src/ui.js
parentuse jsonld framing, add discussion title (diff)
downloadfedidag-10763285c8ef03e2e7639ba1c49e7e9162edbf2a.tar.gz
fedidag-10763285c8ef03e2e7639ba1c49e7e9162edbf2a.zip
node collapsing (w/o relayouting)
Diffstat (limited to 'src/ui.js')
-rw-r--r--src/ui.js3
1 files changed, 2 insertions, 1 deletions
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
? <header class="small" />