Skip to content

Commit

Permalink
JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Mar 18, 2024
1 parent e2581ca commit ad569ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/mui-base/src/utils/BaseUiComponentCommonProps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
/**
* Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
*
* @template Props Props to be spread on the rendered element.
* @template State Component's internal state.
*/
export type ComponentRenderFn<Props, State> = (props: Props, state: State) => React.ReactElement;

/**
* Props shared by all Base UI components.
* Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
*/
export type BaseUiComponentCommonProps<ElementType extends React.ElementType, OwnerState> = Omit<
React.ComponentPropsWithoutRef<ElementType>,
'className'
Expand Down

0 comments on commit ad569ba

Please sign in to comment.