Skip to content

Commit

Permalink
moved kebabcase to mui/types
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Jan 18, 2023
1 parent 2282019 commit 32a77ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/mui-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ export type PropInjector<InjectedProps, AdditionalProps = {}> = <
export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;

/**
* Converts Object keys from CamelCase to KebabCase
* @internal
*/
type Kebab<T extends string, A extends string = ''> = T extends `${infer F}${infer R}`
? Kebab<R, `${A}${F extends Lowercase<F> ? '' : '-'}${Lowercase<F>}`>
: A;
? Kebab<R, `${A}${F extends Lowercase<F> ? '' : '-'}${Lowercase<F>}`>
: A;
/**
* Converts Object keys from CamelCase to KebabCase
* @internal
*/
export type KebabKeys<T> = { [K in keyof T as K extends string ? Kebab<K> : K]: T[K] };
Expand Down

0 comments on commit 32a77ec

Please sign in to comment.