Skip to content

Commit

Permalink
Simplify BaseControl type and rely more on inference
Browse files Browse the repository at this point in the history
Without this, the docgen is confused and fails to mark `children` as required
  • Loading branch information
mirka committed Mar 23, 2022
1 parent 8325df1 commit 8214be2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/components/src/base-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ import {
* </BaseControl>
* );
*/
export const BaseControl: FunctionComponent< BaseControlProps > & {
VisualLabel: typeof VisualLabel;
} = ( {
export const BaseControl = ( {
__nextHasNoMarginBottom = false,
id,
label,
hideLabelFromVision = false,
help,
className,
children,
} ) => {
}: BaseControlProps ) => {
return (
<Wrapper
className={ classnames( 'components-base-control', className ) }
Expand Down

0 comments on commit 8214be2

Please sign in to comment.