Skip to content

Commit f503fb6

Browse files
committed
refactor(components): ♻️ update components to use refactored useHaptic hook
1 parent 568bdb3 commit f503fb6

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/components/button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const RNButton: React.FC<Partial<ButtonProps>> = forwardRef<
127127
const { ts, gc } = useTailwind();
128128
const buttonTheme = useTheme("button");
129129
const { handlers, animatedStyle } = useScaleAnimation();
130-
const { hapticMedium } = useHaptic();
130+
const hapticMedium = useHaptic("medium");
131131
const { onHoverIn, onHoverOut, hovered } = useOnHover();
132132
const { onFocus, onBlur, focused } = useOnFocus();
133133

src/components/checkbox/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const RNCheckbox: React.FC<Partial<CheckboxProps>> = forwardRef<
134134
const { onHoverIn, onHoverOut, hovered } = useOnHover();
135135
const { onFocus, onBlur, focused } = useOnFocus();
136136
const { handlers, animatedStyle } = useScaleAnimation();
137-
const { hapticSelection } = useHaptic();
137+
const hapticSelection = useHaptic();
138138

139139
const hasOnlyLabel = label && !description;
140140

src/components/radio/Radio.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const RNRadio: React.FC<Partial<RadioProps>> = forwardRef<
8787

8888
const { onHoverIn, onHoverOut, hovered } = useOnHover();
8989
const { onFocus, onBlur, focused } = useOnFocus();
90-
const { hapticSelection } = useHaptic();
90+
const hapticSelection = useHaptic();
9191
const { handlers, animatedStyle } = useScaleAnimation();
9292
const state = useRadioGroupContext();
9393

src/components/switch/Switch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const RNSwitch: React.FC<Partial<SwitchProps>> = forwardRef<
135135
});
136136

137137
const thumbAnimated = useSharedValue(switchState ? 1 : 0);
138-
const { hapticSelection } = useHaptic();
138+
const hapticSelection = useHaptic();
139139
/**
140140
* Setting Active/Inactive and Default Colors
141141
*/

src/components/tag/Tag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const RNTag: React.FC<Partial<TagProps>> = forwardRef<
8989
const { onHoverIn, onHoverOut, hovered } = useOnHover();
9090
const { onFocus, onBlur, focused } = useOnFocus();
9191
const { handlers, animatedStyle } = useScaleAnimation();
92-
const { hapticSelection } = useHaptic();
92+
const hapticSelection = useHaptic();
9393

9494
const {
9595
size = "md",

0 commit comments

Comments
 (0)