Skip to content

Commit

Permalink
feat(types): enhance ThemingProps interface with additional theme man…
Browse files Browse the repository at this point in the history
…agement properties
  • Loading branch information
SutuSebastian committed Jan 5, 2025
1 parent 8895d51 commit 6975519
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/ui/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,29 @@ export type DeepPartialApplyTheme<T> = DeepPartialOf<T, ApplyTheme>;
export type ApplyTheme = "merge" | "replace";

export interface ThemingProps<T> {
/**
* Partial theme object to merge (or replace, see `applyTheme` prop) with default theme
*
* @link https://flowbite-react.com/docs/customize/theme
* @default undefined
*/
theme?: DeepPartial<T>;
/**
* Indicates which theme properties should be cleared
*
* `boolean` | partial `theme` structure of `boolean`
*
* @link https://flowbite-react.com/docs/customize/theme
* @default undefined
*/
clearTheme?: DeepPartialBoolean<T>;
/**
* Specifies how theme properties should be applied/merged
*
* `"merge"` | `"replace"` | partial `theme` structure of `"merge"` | `"replace"`
*
* @link https://flowbite-react.com/docs/customize/theme
* @default "merge"
*/
applyTheme?: DeepPartialApplyTheme<T>;
}

0 comments on commit 6975519

Please sign in to comment.