import React, { useMemo } from 'react'; import { StyleProp, StyleSheet, View, ViewProps, ViewStyle } from 'react-native'; import { useTheme } from '../../../contexts/themeContext/ThemeContext'; import { Reload } from '../../../icons/refresh'; import { primitives } from '../../../theme'; const sizes = { lg: { height: 32, width: 32, }, md: { height: 24, width: 24, }, }; const iconSizes = { lg: { height: 16, width: 16, }, md: { height: 12, width: 12, }, }; export type RetryBadgeProps = ViewProps & { /** * The size of the badge * @default 'md' * @type {'lg' | 'md'} */ size: 'lg' | 'md'; /** * The style of the badge * @default undefined * @type {StyleProp} */ style?: StyleProp; }; export const RetryBadge = (props: RetryBadgeProps) => { const { size = 'md', style, ...rest } = props; const { theme: { semantics }, } = useTheme(); const styles = useStyles(); return ( ); }; const useStyles = () => { const { theme: { semantics }, } = useTheme(); return useMemo(() => { return StyleSheet.create({ container: { alignItems: 'center', justifyContent: 'center', borderRadius: primitives.radiusMax, backgroundColor: semantics.badgeBgError, }, }); }, [semantics]); };