Skip to content

Commit

Permalink
Add JSDoc for slots/slotProps props for Joy
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Mar 28, 2023
1 parent 0eb34d7 commit b8cc13b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/mui-joy/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ export type SlotProps<TSlotComponent extends React.ElementType, TOverrides, TOwn
* @example CreateSlotsAndSlotProps<{ root: React.ElementType, decorator: React.ElementType }, { root: ..., decorator: ... }>
*/
export type CreateSlotsAndSlotProps<Slots, K extends Record<keyof Slots, any>> = {
/**
* The components used for each slot inside.
* @default {}
*/
slots?: Partial<Slots>;
/**
* The props used for each slot inside.
* @default {}
*/
slotProps?: {
[P in keyof K]?: K[P];
};
Expand Down

0 comments on commit b8cc13b

Please sign in to comment.