From aaec90c510835c7b57472c42c038c8d333c1f914 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Tue, 26 Apr 2022 16:46:46 +1000 Subject: [PATCH] Type RangeRail and Marks through WordPressComponentProps --- packages/components/src/range-control/rail.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/components/src/range-control/rail.tsx b/packages/components/src/range-control/rail.tsx index 127c76eb1a247d..df4fb11e383577 100644 --- a/packages/components/src/range-control/rail.tsx +++ b/packages/components/src/range-control/rail.tsx @@ -9,6 +9,7 @@ import { isRTL } from '@wordpress/i18n'; import RangeMark from './mark'; import { MarksWrapper, Rail } from './styles/range-control-styles'; +import type { WordPressComponentProps } from '../ui/context'; import type { MarksProps, RangeMarkProps, @@ -16,7 +17,9 @@ import type { useMarksArgs, } from './types'; -export default function RangeRail( props: RailProps ) { +export default function RangeRail( + props: WordPressComponentProps< RailProps, 'span' > +) { const { disabled = false, marks = false, @@ -44,7 +47,7 @@ export default function RangeRail( props: RailProps ) { ); } -function Marks( props: MarksProps ) { +function Marks( props: WordPressComponentProps< MarksProps, 'span' > ) { const { disabled = false, marks = false,