Skip to content

Commit

Permalink
Specify type in SegmentedControlExample to avoid implicit any
Browse files Browse the repository at this point in the history
  • Loading branch information
ggdouglas committed Jan 9, 2025
1 parent c9aa576 commit 074b795
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ import { type Size, SizeSelect } from "./common/sizeSelect";

export const SegmentedControlExample: React.FC<ExampleProps> = props => {
const [intent, setIntent] = React.useState<SegmentedControlIntent>("none");
const handleIntentChange = React.useCallback(newIntent => setIntent(newIntent as SegmentedControlIntent), []);
const handleIntentChange = React.useCallback(
(newIntent: string) => setIntent(newIntent as SegmentedControlIntent),
[],
);

const [fill, setFill] = React.useState<boolean>(false);
const [inline, setInline] = React.useState<boolean>(false);
Expand Down

0 comments on commit 074b795

Please sign in to comment.