Skip to content

Commit bc75f25

Browse files
committed
Refactor some code
1 parent f0b4301 commit bc75f25

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/snaps-sdk/src/jsx/components/Skeleton.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { createSnapComponent } from '../component';
2-
3-
/**
4-
* Definition of Skeleton border radius.
5-
*/
6-
export type SkeletonBorderRadius = 'none' | 'medium' | 'full' | undefined;
2+
import type { BorderRadius } from './utils';
73

84
/**
95
* The props of the {@link Skeleton} component.
@@ -15,7 +11,7 @@ export type SkeletonBorderRadius = 'none' | 'medium' | 'full' | undefined;
1511
export type SkeletonProps = {
1612
width: number | string;
1713
height: number | string;
18-
borderRadius?: SkeletonBorderRadius | undefined;
14+
borderRadius?: BorderRadius | undefined;
1915
};
2016

2117
const TYPE = 'Skeleton';
@@ -28,7 +24,7 @@ const TYPE = 'Skeleton';
2824
* @param props.width - Height of the Skeleton.
2925
* @param props.borderRadius - Border radius of the Skeleton.
3026
* @example
31-
* <Skeleton height={32} width={50%} />
27+
* <Skeleton height={32} width="50%" />
3228
*/
3329
export const Skeleton = createSnapComponent<SkeletonProps, typeof TYPE>(TYPE);
3430

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Definition of border radius.
3+
*/
4+
export type BorderRadius = 'none' | 'medium' | 'full' | undefined;

0 commit comments

Comments
 (0)