Skip to content

Commit

Permalink
Fix typescript comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Feb 2, 2024
1 parent c486926 commit eb644ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src-docs/src/views/theme/color/_contrast_slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
ratingAll,
} from './_contrast_utilities';

type ContrastSlider = EuiFlexGroupProps & {
type ContrastSlider = Omit<EuiFlexGroupProps, 'onChange'> & {
contrastValue: EuiRangeProps['value'];
showTextVariants: boolean;
onChange?: (value: number | string, checked: boolean) => void;
Expand Down
8 changes: 2 additions & 6 deletions src-docs/src/views/theme/color/contrast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,8 @@ export default () => {
<ContrastSlider
contrastValue={contrastValue}
showTextVariants={showTextVariants}
// @ts-ignore Help
onChange={(
sliderValue: React.SetStateAction<number>,
toggleChecked: React.SetStateAction<boolean>
) => {
setContrastValue(sliderValue);
onChange={(sliderValue, toggleChecked) => {
setContrastValue(Number(sliderValue));
setShowTextVariants(toggleChecked);
}}
/>
Expand Down

0 comments on commit eb644ae

Please sign in to comment.