Skip to content

Commit

Permalink
Fix case for custom hook types
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jul 12, 2022
1 parent c2c7d1e commit f19616e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/range-control/rail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
MarksProps,
RangeMarkProps,
RailProps,
useMarksArgs,
UseMarksArgs,
} from './types';

export default function RangeRail(
Expand Down Expand Up @@ -83,7 +83,7 @@ function useMarks( {
max = 100,
step = 1,
value = 0,
}: useMarksArgs ) {
}: UseMarksArgs ) {
if ( ! marks ) {
return [];
}
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/range-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export type TrackProps = {
trackColor: CSSProperties[ 'color' ];
};

export type useControlledRangeValueArgs = {
export type UseControlledRangeValueArgs = {
/**
* The initial value.
*/
Expand All @@ -287,7 +287,7 @@ export type useControlledRangeValueArgs = {
value: number | null;
};

export type useDebouncedHoverInteractionArgs = {
export type UseDebouncedHoverInteractionArgs = {
/**
* A callback function invoked when the element is hidden.
*
Expand Down Expand Up @@ -320,7 +320,7 @@ export type useDebouncedHoverInteractionArgs = {
timeout?: number;
};

export type useMarksArgs = NumericProps & {
export type UseMarksArgs = NumericProps & {
marks: RangeMarks;
step: number;
};
8 changes: 4 additions & 4 deletions packages/components/src/range-control/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { useControlledState } from '../utils/hooks';
import { clamp } from '../utils/math';

import type {
useControlledRangeValueArgs,
useDebouncedHoverInteractionArgs,
UseControlledRangeValueArgs,
UseDebouncedHoverInteractionArgs,
} from './types';

const noop = () => {};
Expand Down Expand Up @@ -45,7 +45,7 @@ export function floatClamp( value: number | null, min: number, max: number ) {
* @return The controlled value and the value setter.
*/
export function useControlledRangeValue(
settings: useControlledRangeValueArgs
settings: UseControlledRangeValueArgs
) {
const { min, max, value: valueProp, initial } = settings;
const [ state, setInternalState ] = useControlledState(
Expand Down Expand Up @@ -77,7 +77,7 @@ export function useControlledRangeValue(
* @return Bound properties for use on a React.Node.
*/
export function useDebouncedHoverInteraction(
settings: useDebouncedHoverInteractionArgs
settings: UseDebouncedHoverInteractionArgs
) {
const {
onHide = noop,
Expand Down

0 comments on commit f19616e

Please sign in to comment.