/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
core/src/components/alert/animations/md.enter.ts
31 строка
955 B
Maria Hutt
refactor(many): use utils import (#27160)
12 апр 2023, 23:25
Не верифицирован
12 апр 2023, 23:25
0a0345a
Код
Авторство
О чём код?
import { createAnimation } from '@utils/animation/animation'; import type { Animation } from '../../../interface'; /** * Md Alert Enter Animation */ export const mdEnterAnimation = (baseEl: HTMLElement): Animation => { const baseAnimation = createAnimation(); const backdropAnimation = createAnimation(); const wrapperAnimation = createAnimation(); backdropAnimation .addElement(baseEl.querySelector('ion-backdrop')!) .fromTo('opacity', 0.01, 'var(--backdrop-opacity)') .beforeStyles({ 'pointer-events': 'none', }) .afterClearStyles(['pointer-events']); wrapperAnimation.addElement(baseEl.querySelector('.alert-wrapper')!).keyframes([ { offset: 0, opacity: '0.01', transform: 'scale(0.9)' }, { offset: 1, opacity: '1', transform: 'scale(1)' }, ]); return baseAnimation .addElement(baseEl) .easing('ease-in-out') .duration(150) .addAnimation([backdropAnimation, wrapperAnimation]); };