Skip to content

Commit

Permalink
update JSDoc of CreateSlotsAndSlotProps
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Feb 22, 2023
1 parent 9718f5f commit da6cd85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mui-joy/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export type SlotProps<TSlotComponent extends React.ElementType, TOverrides, TOwn
Record<string, unknown>);

/**
* Use T to make sure that K contains all of the keys of T
* Use the keys of `Slots` to make sure that K contains all of the keys
*
* @example CreateSlotsAndSlotProps<'root' | 'decorator', { root: ..., decorator: ... }>
* @example CreateSlotsAndSlotProps<{ root: React.ElementType, decorator: React.ElementType }, { root: ..., decorator: ... }>
*/
export type CreateSlotsAndSlotProps<Slots, K extends Record<keyof Slots, any>> = {
slots?: Partial<Slots>;
Expand Down

0 comments on commit da6cd85

Please sign in to comment.