Skip to content

Commit

Permalink
fix: the typescript issue by changing fallback to reactNode
Browse files Browse the repository at this point in the history
  • Loading branch information
HamzaAmar committed Nov 29, 2024
1 parent 0d5ad9c commit d4f1d67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/pillar-core/src/core/avatar/_avatar.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--fx: inline-flex;
--eq-s: 2.75em;
padding: 0;
font-weight: 500;
/* border: 3px solid var(--B1); */
background:
linear-gradient(var(--av-b), var(--av-b)) content-box,
Expand Down
4 changes: 2 additions & 2 deletions packages/pillar-core/src/core/avatar/avatar.type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactElement, ReactNode } from 'react'
import { ReactNode } from 'react'
import type { Color, Corner, CornerBlob, CornerHand, Size, Variant } from '../../types'

type Animate = 'zoom' | 'jump-y' | 'jump-x' | 'jump--y' | 'jump--x' | 'zoom-in'
Expand All @@ -9,7 +9,7 @@ interface AvatarBase {
color?: Color
variant?: Omit<Variant, 'text'> | 'dashed'
animate?: Animate
fallback?: ReactElement
fallback?: ReactNode
}

export interface AvatarProps extends AvatarBase {
Expand Down
4 changes: 4 additions & 0 deletions packages/pillar-core/src/core/switch/_switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
flex: none;
height: 1.25em;

& svg {
width: 1em;
}

/*
These properties serve as fallbacks. If the corresponding utility functions are
unavailable, these properties take priority. However, if specific props related to
Expand Down

0 comments on commit d4f1d67

Please sign in to comment.