Skip to content

Commit 786c543

Browse files
committed
fix: formatting
1 parent 360f33e commit 786c543

File tree

1 file changed

+20
-9
lines changed
  • packages/component-library/src/Skeleton

1 file changed

+20
-9
lines changed

packages/component-library/src/Skeleton/index.tsx

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,27 @@ type Props = Omit<ComponentProps<"span">, "children"> & {
1111
fill?: boolean | undefined;
1212
};
1313

14-
export const Skeleton = ({ className, label, width, fill, ...props }: Props) =>
15-
<span
16-
data-fill-width={width === undefined ? "" : undefined}
17-
{...(width && { style: { "--skeleton-width": width } as CSSProperties })}
18-
className={clsx(styles.skeleton, { [styles.fullSkeleton ?? '']: fill }, { [className ?? ""]: fill })}
19-
>
20-
<span className={clsx(styles.skeletonInner, className)} {...props}>
21-
<Label>{label ?? "Loading"}</Label>
22-
</span>
14+
export const Skeleton = ({
15+
className,
16+
label,
17+
width,
18+
fill,
19+
...props
20+
}: Props) => (
21+
<span
22+
data-fill-width={width === undefined ? "" : undefined}
23+
{...(width && { style: { "--skeleton-width": width } as CSSProperties })}
24+
className={clsx(
25+
styles.skeleton,
26+
{ [styles.fullSkeleton ?? ""]: fill },
27+
{ [className ?? ""]: fill },
28+
)}
29+
>
30+
<span className={clsx(styles.skeletonInner, className)} {...props}>
31+
<Label>{label ?? "Loading"}</Label>
2332
</span>
33+
</span>
34+
);
2435

2536
const Label = ({ children }: { children: string | undefined }) => (
2637
<span className={styles.skeletonLabel}>{children ?? "Loading"}</span>

0 commit comments

Comments
 (0)