Skip to content

Commit

Permalink
fix: handle boolean props
Browse files Browse the repository at this point in the history
  • Loading branch information
gavmck committed Feb 29, 2024
1 parent f8598d9 commit aa28929
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions components/canvas/Card/Card.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { JSXCustomElement } from '../../../types/jsx-custom-element';

export interface CardAttributes {
border?: boolean;
shadow?: boolean;
muted?: boolean;
radius?: boolean;
border?: string | boolean;
shadow?: string | boolean;
muted?: string | boolean;
radius?: string | boolean;
padding?:
| 'xs'
| 'sm'
Expand Down
4 changes: 2 additions & 2 deletions components/composition/Enter/Enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { JSXCustomElement } from '../../../types/jsx-custom-element';

export interface EnterAttributes {
type?: 'fade' | 'fade-in-up' | 'boing';
enterOnScroll?: boolean;
enterOnScroll?: string | boolean;
delay?: string | number;
/**
* Applies display grid so that children fill the height and width of the component
*/
fill?: boolean;
fill?: string | boolean;
}

@customElement('diamond-enter')
Expand Down
2 changes: 1 addition & 1 deletion components/composition/Grid/Grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { JSXCustomElement } from '../../../types/jsx-custom-element';

export interface GridAttributes {
wrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
inline?: boolean;
inline?: string | boolean;
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
justifyContent?:
| 'flex-start'
Expand Down
6 changes: 3 additions & 3 deletions components/composition/Grid/GridItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ type Column =
| '12';

export interface GridItemAttributes {
grow?: boolean;
shrink?: boolean;
grow?: string | boolean;
shrink?: string | boolean;
/**
* Applies display grid so that children fill the height and width of the grid item
*/
fill?: boolean;
fill?: string | boolean;
smallMobile?: Column;
mobile?: Column;
largeMobile?: Column;
Expand Down
6 changes: 3 additions & 3 deletions components/content/Img/Img.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { customElement, property } from 'lit/decorators.js';
import { JSXCustomElement } from '../../../types/jsx-custom-element';

export interface ImgAttributes {
block?: boolean;
responsive?: boolean;
block?: string | boolean;
responsive?: string | boolean;
aspectRatio?: string;
radius?: boolean;
radius?: string | boolean;
objectFit?: 'cover' | 'contain';
objectPosition?: string;
}
Expand Down

0 comments on commit aa28929

Please sign in to comment.