Skip to content

Commit

Permalink
feat(component): add customizable properties value
Browse files Browse the repository at this point in the history
  • Loading branch information
MGREMY committed Apr 8, 2024
1 parent d0bd5fc commit ffcb1e3
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 12 deletions.
2 changes: 2 additions & 0 deletions libs/flowbite-angular/src/lib/common/flowbite.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface FlowbiteStateColors {
}

export interface FlowbiteColors extends FlowbiteStateColors {
[key: string]: string;
blue: string;
cyan: string;
dark: string;
Expand All @@ -32,6 +33,7 @@ export interface FlowbiteColors extends FlowbiteStateColors {

export interface FlowbiteGradientColors
extends Omit<FlowbiteStateColors, 'warning'> {
[key: string]: string;
cyan: string;
lime: string;
pink: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export interface AlertButtonTheme {
}

export interface AlertColors
extends Pick<FlowbiteColors, 'blue' | 'red' | 'green' | 'yellow' | 'gray'> {}
extends Pick<FlowbiteColors, 'blue' | 'red' | 'green' | 'yellow' | 'gray'> {
[key: string]: string;
}

export const alertTheme: AlertBaseTheme = {
root: {
Expand Down
8 changes: 6 additions & 2 deletions libs/flowbite-angular/src/lib/components/badge/badge.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ export interface BadgeColors
extends Pick<
FlowbiteColors,
'blue' | 'dark' | 'red' | 'green' | 'yellow' | 'indigo' | 'purple' | 'pink'
> {}
> {
[key: string]: string;
}

export interface BadgeSizes extends Pick<FlowbiteSizes, 'xs' | 'sm'> {}
export interface BadgeSizes extends Pick<FlowbiteSizes, 'xs' | 'sm'> {
[key: string]: string;
}

export const badgeTheme: BadgeBaseTheme = {
root: {
Expand Down
16 changes: 12 additions & 4 deletions libs/flowbite-angular/src/lib/components/button/button.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export interface ButtonColors
| 'purple'
| 'success'
| 'warning'
> {}
> {
[key: string]: string;
}

export interface ButtonMonochromeColors
extends Pick<
Expand All @@ -68,7 +70,9 @@ export interface ButtonMonochromeColors
| 'failure'
| 'pink'
| 'purple'
> {}
> {
[key: string]: string;
}

export interface ButtonDuoToneColors
extends Pick<
Expand All @@ -80,10 +84,14 @@ export interface ButtonDuoToneColors
| 'pinkToOrange'
| 'tealToLime'
| 'redToYellow'
> {}
> {
[key: string]: string;
}

export interface ButtonSizes
extends Pick<FlowbiteSizes, 'xs' | 'sm' | 'md' | 'lg' | 'xl'> {}
extends Pick<FlowbiteSizes, 'xs' | 'sm' | 'md' | 'lg' | 'xl'> {
[key: string]: string;
}

export interface ButtonFill {
solid: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export interface FormFieldFloatingLabelTypes {
}

export interface FormFieldSizes
extends Pick<FlowbiteSizes, 'sm' | 'md' | 'lg'> {}
extends Pick<FlowbiteSizes, 'sm' | 'md' | 'lg'> {
[key: string]: string;
}

export interface FormFieldValidations {
success: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export interface IndicatorColors
| 'yellow'
| 'teal'
| 'gray'
> {}
> {
[key: string]: string;
}

export const indicatorTheme: IndicatorBaseTheme = {
root: {
Expand Down
8 changes: 6 additions & 2 deletions libs/flowbite-angular/src/lib/components/modal/modal.theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export interface ModalContentRootTheme {
}

export interface ModalSizes
extends Pick<FlowbiteSizes, 'sm' | 'md' | 'lg' | 'xl'> {}
extends Pick<FlowbiteSizes, 'sm' | 'md' | 'lg' | 'xl'> {
[key: string]: string;
}

export interface ModalPositions
extends Pick<
Expand All @@ -44,7 +46,9 @@ export interface ModalPositions
| 'bottom-center'
| 'center-left'
| 'center-right'
> {}
> {
[key: string]: string;
}

export const modalTheme: ModalBaseTheme = {
root: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export interface NavbarContentTheme {
fluid: Record<keyof FlowbiteBoolean, string>;
}

export interface NavbarColors extends Pick<FlowbiteColors, 'gray'> {}
export interface NavbarColors extends Pick<FlowbiteColors, 'gray'> {
[key: string]: string;
}

export const navbarTheme: NavbarBaseTheme = {
root: {
Expand Down

0 comments on commit ffcb1e3

Please sign in to comment.