Skip to content

Commit

Permalink
refactor(components): ♻️ update components to use refactored useHapti…
Browse files Browse the repository at this point in the history
…c hook
  • Loading branch information
Karthik-B-06 committed Jan 10, 2023
1 parent 568bdb3 commit f503fb6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const RNButton: React.FC<Partial<ButtonProps>> = forwardRef<
const { ts, gc } = useTailwind();
const buttonTheme = useTheme("button");
const { handlers, animatedStyle } = useScaleAnimation();
const { hapticMedium } = useHaptic();
const hapticMedium = useHaptic("medium");
const { onHoverIn, onHoverOut, hovered } = useOnHover();
const { onFocus, onBlur, focused } = useOnFocus();

Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const RNCheckbox: React.FC<Partial<CheckboxProps>> = forwardRef<
const { onHoverIn, onHoverOut, hovered } = useOnHover();
const { onFocus, onBlur, focused } = useOnFocus();
const { handlers, animatedStyle } = useScaleAnimation();
const { hapticSelection } = useHaptic();
const hapticSelection = useHaptic();

const hasOnlyLabel = label && !description;

Expand Down
2 changes: 1 addition & 1 deletion src/components/radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const RNRadio: React.FC<Partial<RadioProps>> = forwardRef<

const { onHoverIn, onHoverOut, hovered } = useOnHover();
const { onFocus, onBlur, focused } = useOnFocus();
const { hapticSelection } = useHaptic();
const hapticSelection = useHaptic();
const { handlers, animatedStyle } = useScaleAnimation();
const state = useRadioGroupContext();

Expand Down
2 changes: 1 addition & 1 deletion src/components/switch/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const RNSwitch: React.FC<Partial<SwitchProps>> = forwardRef<
});

const thumbAnimated = useSharedValue(switchState ? 1 : 0);
const { hapticSelection } = useHaptic();
const hapticSelection = useHaptic();
/**
* Setting Active/Inactive and Default Colors
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const RNTag: React.FC<Partial<TagProps>> = forwardRef<
const { onHoverIn, onHoverOut, hovered } = useOnHover();
const { onFocus, onBlur, focused } = useOnFocus();
const { handlers, animatedStyle } = useScaleAnimation();
const { hapticSelection } = useHaptic();
const hapticSelection = useHaptic();

const {
size = "md",
Expand Down

0 comments on commit f503fb6

Please sign in to comment.