parent
0878275ab9
commit
6efc28aac8
|
@ -98,7 +98,7 @@
|
|||
import { measureText } from '../../_utils/measureText'
|
||||
import { POST_PRIVACY_OPTIONS } from '../../_static/statuses'
|
||||
import { store } from '../../_store/store'
|
||||
import { slide } from 'svelte-transitions'
|
||||
import { slide } from '../../_transitions/slide'
|
||||
import { postStatus, insertHandleForReply, setReplySpoiler, setReplyVisibility } from '../../_actions/compose'
|
||||
import { classname } from '../../_utils/classname'
|
||||
import { POLL_EXPIRY_DEFAULT } from '../../_static/polls'
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import { slide as svelteSlide } from 'svelte-transitions'
|
||||
import { store } from '../_store/store'
|
||||
import noop from 'lodash-es/noop'
|
||||
|
||||
// same as svelte-transitions, but respecting reduceMotion
|
||||
export function slide (node, ref) {
|
||||
let { reduceMotion } = store.get()
|
||||
if (reduceMotion) {
|
||||
return {
|
||||
delay: 0,
|
||||
duration: 1, // setting to 0 causes some kind of built-in duration
|
||||
easing: _ => _,
|
||||
css: noop
|
||||
}
|
||||
}
|
||||
return svelteSlide(node, ref)
|
||||
}
|
Loading…
Reference in New Issue