Fix default loader color (#2891)
parent
1d729721e5
commit
4e66c9b806
|
@ -7,11 +7,12 @@ import Animated, {
|
||||||
withTiming,
|
withTiming,
|
||||||
} from 'react-native-reanimated'
|
} from 'react-native-reanimated'
|
||||||
|
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a, useTheme, flatten} from '#/alf'
|
||||||
import {Props, useCommonSVGProps} from '#/components/icons/common'
|
import {Props, useCommonSVGProps} from '#/components/icons/common'
|
||||||
import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
|
import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
|
||||||
|
|
||||||
export function Loader(props: Props) {
|
export function Loader(props: Props) {
|
||||||
|
const t = useTheme()
|
||||||
const common = useCommonSVGProps(props)
|
const common = useCommonSVGProps(props)
|
||||||
const rotation = useSharedValue(0)
|
const rotation = useSharedValue(0)
|
||||||
|
|
||||||
|
@ -35,7 +36,15 @@ export function Loader(props: Props) {
|
||||||
{width: common.size, height: common.size},
|
{width: common.size, height: common.size},
|
||||||
animatedStyles,
|
animatedStyles,
|
||||||
]}>
|
]}>
|
||||||
<Icon {...props} style={[a.absolute, a.inset_0, props.style]} />
|
<Icon
|
||||||
|
{...props}
|
||||||
|
style={[
|
||||||
|
a.absolute,
|
||||||
|
a.inset_0,
|
||||||
|
t.atoms.text_contrast_high,
|
||||||
|
flatten(props.style),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import {H1} from '#/components/Typography'
|
||||||
import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe'
|
import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe'
|
||||||
import {ArrowTopRight_Stroke2_Corner0_Rounded as ArrowTopRight} from '#/components/icons/ArrowTopRight'
|
import {ArrowTopRight_Stroke2_Corner0_Rounded as ArrowTopRight} from '#/components/icons/ArrowTopRight'
|
||||||
import {CalendarDays_Stroke2_Corner0_Rounded as CalendarDays} from '#/components/icons/CalendarDays'
|
import {CalendarDays_Stroke2_Corner0_Rounded as CalendarDays} from '#/components/icons/CalendarDays'
|
||||||
|
import {Loader} from '#/components/Loader'
|
||||||
|
|
||||||
export function Icons() {
|
export function Icons() {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
@ -36,6 +37,14 @@ export function Icons() {
|
||||||
<CalendarDays size="lg" fill={t.atoms.text.color} />
|
<CalendarDays size="lg" fill={t.atoms.text.color} />
|
||||||
<CalendarDays size="xl" fill={t.atoms.text.color} />
|
<CalendarDays size="xl" fill={t.atoms.text.color} />
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
<View style={[a.flex_row, a.gap_xl]}>
|
||||||
|
<Loader size="xs" fill={t.atoms.text.color} />
|
||||||
|
<Loader size="sm" fill={t.atoms.text.color} />
|
||||||
|
<Loader size="md" fill={t.atoms.text.color} />
|
||||||
|
<Loader size="lg" fill={t.atoms.text.color} />
|
||||||
|
<Loader size="xl" fill={t.atoms.text.color} />
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue