From 93b606e55a7bb10cc77665c68c75b6b13a673c9f Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 4 Apr 2024 23:18:06 +0100 Subject: Use CSS keyframe animation for spinner on web (#3411) * Use css keyframe animation for spinner on web * duplicate css to index.html --- src/components/Loader.tsx | 4 ++-- src/components/Loader.web.tsx | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 src/components/Loader.web.tsx (limited to 'src') diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx index b9f399f95..e0b3be637 100644 --- a/src/components/Loader.tsx +++ b/src/components/Loader.tsx @@ -1,13 +1,13 @@ import React from 'react' import Animated, { Easing, - useSharedValue, useAnimatedStyle, + useSharedValue, withRepeat, withTiming, } from 'react-native-reanimated' -import {atoms as a, useTheme, flatten} from '#/alf' +import {atoms as a, flatten, useTheme} from '#/alf' import {Props, useCommonSVGProps} from '#/components/icons/common' import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' diff --git a/src/components/Loader.web.tsx b/src/components/Loader.web.tsx new file mode 100644 index 000000000..d8182673f --- /dev/null +++ b/src/components/Loader.web.tsx @@ -0,0 +1,34 @@ +import React from 'react' +import {View} from 'react-native' + +import {atoms as a, flatten, useTheme} from '#/alf' +import {Props, useCommonSVGProps} from '#/components/icons/common' +import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' + +export function Loader(props: Props) { + const t = useTheme() + const common = useCommonSVGProps(props) + + return ( + + {/* css rotation animation - /bskyweb/templates/base.html */} +
+ +
+
+ ) +} -- cgit 1.4.1