Skip to content

Commit

Permalink
💄 Change Skeleton width and height to max to improve responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
Frontendland committed Nov 17, 2024
1 parent 8e94c6b commit 59ea089
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Skeleton/Skeleton.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const classes = [
]
const styleVariables = classNames([
width && `width: ${width}px;`,
height && `height: ${height}px;`,
width && `max-width: ${width}px;`,
height && `max-height: ${height}px;`,
color && `--w-skeleton-color: ${color};`,
waveColor && `--w-skeleton-wave-color: ${waveColor};`
])
Expand Down
4 changes: 2 additions & 2 deletions src/components/Skeleton/Skeleton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
])
const styleVariables = classNames([
width && `width: ${width}px;`,
height && `height: ${height}px;`,
width && `max-width: ${width}px;`,
height && `max-height: ${height}px;`,
color && `--w-skeleton-color: ${color};`,
waveColor && `--w-skeleton-wave-color: ${waveColor};`
])
Expand Down
4 changes: 2 additions & 2 deletions src/components/Skeleton/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const Skeleton = ({
])

const styleVariables = {
...(width && { width: `${width}px` }),
...(height && { height: `${height}px` }),
...(width && { maxWidth: `${width}px` }),
...(height && { maxHeight: `${height}px` }),
...(color && { '--w-skeleton-color': color }),
...(waveColor && { '--w-skeleton-wave-color': waveColor })
} as React.CSSProperties
Expand Down

0 comments on commit 59ea089

Please sign in to comment.