mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-30 02:23:56 +03:00
fix: lottie import logic (#1526)
This commit is contained in:
parent
9043081b8d
commit
1239957446
@ -1,8 +1,6 @@
|
|||||||
import React, { cloneElement, HTMLAttributes, useState } from 'react';
|
import React, { cloneElement, HTMLAttributes, useState } from 'react';
|
||||||
import Lottie from 'react-lottie';
|
import Lottie from 'react-lottie';
|
||||||
|
|
||||||
import * as edgelessHoverAnimationData from './animation-data/edgeless-hover.json';
|
|
||||||
import * as pageHoverAnimationData from './animation-data/page-hover.json';
|
|
||||||
import { StyledSwitchItem } from './style';
|
import { StyledSwitchItem } from './style';
|
||||||
|
|
||||||
type HoverAnimateControllerProps = {
|
type HoverAnimateControllerProps = {
|
||||||
@ -49,7 +47,7 @@ export const PageSwitchItem = (
|
|||||||
options={{
|
options={{
|
||||||
loop: false,
|
loop: false,
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
animationData: pageHoverAnimationData,
|
animationData: require('./animation-data/page-hover.json'),
|
||||||
rendererSettings: {
|
rendererSettings: {
|
||||||
preserveAspectRatio: 'xMidYMid slice',
|
preserveAspectRatio: 'xMidYMid slice',
|
||||||
},
|
},
|
||||||
@ -68,7 +66,7 @@ export const EdgelessSwitchItem = (
|
|||||||
options={{
|
options={{
|
||||||
loop: false,
|
loop: false,
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
animationData: edgelessHoverAnimationData,
|
animationData: require('./animation-data/edgeless-hover.json'),
|
||||||
rendererSettings: {
|
rendererSettings: {
|
||||||
preserveAspectRatio: 'xMidYMid slice',
|
preserveAspectRatio: 'xMidYMid slice',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user