From 73b3895b23fed0e127742c9b0efb9f69d63bd091 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 3 Mar 2018 16:25:22 -0800 Subject: [PATCH] add an animation for content warnings --- routes/_components/compose/ComposeBox.html | 13 ++++++++++++- .../_components/compose/ComposeContentWarning.html | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/routes/_components/compose/ComposeBox.html b/routes/_components/compose/ComposeBox.html index abb03420..86647b50 100644 --- a/routes/_components/compose/ComposeBox.html +++ b/routes/_components/compose/ComposeBox.html @@ -1,7 +1,10 @@
{{#if contentWarningShown}} - +
+ +
{{/if}} @@ -30,6 +33,10 @@ max-width: calc(100vw - 40px); } + .compose-content-warning-wrapper { + grid-area: cw; + } + @media (max-width: 767px) { .compose-box { padding: 10px 10px; @@ -50,6 +57,7 @@ import { measureText } from '../../_utils/measureText' import { CHAR_LIMIT, POST_PRIVACY_OPTIONS } from '../../_static/statuses' import { store } from '../../_store/store' + import { slide } from 'svelte-transitions' export default { components: { @@ -78,6 +86,9 @@ overLimit: (length) => length > CHAR_LIMIT, contentWarningShown: (composeData) => composeData.contentWarningShown, contentWarning: (composeData) => composeData.contentWarning || '' + }, + transitions: { + slide } } diff --git a/routes/_components/compose/ComposeContentWarning.html b/routes/_components/compose/ComposeContentWarning.html index c9642cde..b552582a 100644 --- a/routes/_components/compose/ComposeContentWarning.html +++ b/routes/_components/compose/ComposeContentWarning.html @@ -6,7 +6,6 @@ />