-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use css keyframe animation for spinner on web
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<View | ||
style={[ | ||
a.relative, | ||
a.justify_center, | ||
a.align_center, | ||
{width: common.size, height: common.size}, | ||
]}> | ||
{/* css rotation animation - /bskyweb/templates/base.html */} | ||
<div className="rotate-500ms"> | ||
<Icon | ||
{...props} | ||
style={[ | ||
a.absolute, | ||
a.inset_0, | ||
t.atoms.text_contrast_high, | ||
flatten(props.style), | ||
]} | ||
/> | ||
</div> | ||
</View> | ||
) | ||
} |