fix : Pas besoin de theming
This commit is contained in:
@@ -10,7 +10,9 @@ import {
|
||||
type ViewStyle,
|
||||
} from 'react-native';
|
||||
|
||||
import { useTheme } from '@/theme/useTheme';
|
||||
import { colors } from '@/theme/colors';
|
||||
import { borderRadius } from '@/theme/spacing';
|
||||
import { typography } from '@/theme/typography';
|
||||
|
||||
export type BadgeVariant = 'verified' | 'tonight' | 'free' | 'complete' | 'draft' | 'pro' | 'date';
|
||||
|
||||
@@ -48,7 +50,6 @@ export function Badge({
|
||||
style,
|
||||
textStyle,
|
||||
}: BadgeProps) {
|
||||
const { colors, typography, borderRadius } = useTheme();
|
||||
const pulse = useRef(new Animated.Value(1)).current;
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -14,7 +14,10 @@ import {
|
||||
} from 'react-native';
|
||||
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
||||
|
||||
import { useTheme } from '@/theme/useTheme';
|
||||
import { colors, gradientDirection, gradients } from '@/theme/colors';
|
||||
import { borderRadius } from '@/theme/spacing';
|
||||
import { typography } from '@/theme/typography';
|
||||
|
||||
|
||||
const BUTTON_HEIGHT = 52;
|
||||
const PRESSED_SCALE = 0.97;
|
||||
@@ -67,7 +70,6 @@ export function Button({
|
||||
accessibilityLabel,
|
||||
testID,
|
||||
}: ButtonProps) {
|
||||
const { colors, borderRadius, typography, gradients, gradientDirection } = useTheme();
|
||||
const [internalLoading, setInternalLoading] = useState(false);
|
||||
const [isPressed, setIsPressed] = useState(false);
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@ import Animated, {
|
||||
withTiming,
|
||||
} from 'react-native-reanimated';
|
||||
|
||||
import { useTheme } from '@/theme/useTheme';
|
||||
import { colors, glow, gradientDirection, gradients } from '@/theme/colors';
|
||||
import { borderRadius } from '@/theme/spacing';
|
||||
import { typography } from '@/theme/typography';
|
||||
|
||||
type ParticipationValue = {
|
||||
going: boolean;
|
||||
@@ -58,7 +60,6 @@ export function ParticipationSegment({
|
||||
style,
|
||||
testID,
|
||||
}: ParticipationSegmentProps) {
|
||||
const { colors, gradients, gradientDirection, typography, borderRadius, glow } = useTheme();
|
||||
|
||||
const [internalValue, setInternalValue] = useState<ParticipationValue>({
|
||||
going: defaultValue?.going ?? false,
|
||||
|
||||
@@ -11,7 +11,10 @@ import {
|
||||
type ViewStyle,
|
||||
} from 'react-native';
|
||||
|
||||
import { useTheme } from '@/theme/useTheme';
|
||||
import { colors, gradientDirection, gradients } from '@/theme/colors';
|
||||
import { borderRadius } from '@/theme/spacing';
|
||||
import { typography } from '@/theme/typography';
|
||||
|
||||
|
||||
export type ThemeChipSelectedVariant = 'gradient' | 'accent';
|
||||
|
||||
@@ -46,8 +49,6 @@ export function ThemeChip({
|
||||
testID,
|
||||
accessibilityLabel,
|
||||
}: ThemeChipProps) {
|
||||
const { colors, gradients, gradientDirection, borderRadius, typography } = useTheme();
|
||||
|
||||
const resolvedValue = value ?? label;
|
||||
const isGradient = selected && selectedVariant === 'gradient';
|
||||
const showSelectedIcon = selected && (showCross ?? showRemoveIcon);
|
||||
|
||||
Reference in New Issue
Block a user