Skip to content

Commit

Permalink
refactor(badge): add prop value
Browse files Browse the repository at this point in the history
  • Loading branch information
thetaPC committed May 21, 2024
1 parent 34a7b9f commit 1f782c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ ion-backdrop,event,ionBackdropTap,void,true
ion-badge,shadow
ion-badge,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
ion-badge,prop,mode,"ios" | "md",undefined,false,false
ion-badge,prop,size,"small" | undefined,undefined,false,false
ion-badge,prop,size,"medium" | "small" | undefined,undefined,false,false
ion-badge,prop,theme,"ios" | "md" | "ionic",undefined,false,false
ion-badge,css-prop,--background,ionic
ion-badge,css-prop,--background,ios
Expand Down
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export namespace Components {
/**
* Set to `"small"` for less height and width. Set to "medium" for slightly larger dimensions. Defaults to `"small"` for the `ionic` theme, undefined for all other themes.
*/
"size"?: 'small';
"size"?: 'small' | 'medium';
/**
* The theme determines the visual appearance of the component.
*/
Expand Down Expand Up @@ -5644,7 +5644,7 @@ declare namespace LocalJSX {
/**
* Set to `"small"` for less height and width. Set to "medium" for slightly larger dimensions. Defaults to `"small"` for the `ionic` theme, undefined for all other themes.
*/
"size"?: 'small';
"size"?: 'small' | 'medium';
/**
* The theme determines the visual appearance of the component.
*/
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Badge implements ComponentInterface {
* Set to `"small"` for less height and width. Set to "medium" for slightly larger dimensions.
* Defaults to `"small"` for the `ionic` theme, undefined for all other themes.
*/
@Prop() size?: 'small';
@Prop() size?: 'small' | 'medium';

private getSize(): string | undefined {
const theme = getIonTheme(this);
Expand Down

0 comments on commit 1f782c0

Please sign in to comment.