Skip to content

Commit

Permalink
Refactor some code
Browse files Browse the repository at this point in the history
  • Loading branch information
david0xd committed Jan 17, 2025
1 parent 134c92c commit 20007bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/snaps-sdk/src/jsx/components/Skeleton.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { createSnapComponent } from '../component';

/**
* Definition of Skeleton border radius.
*/
export type SkeletonBorderRadius = 'none' | 'medium' | 'full' | undefined;
import type { BorderRadius } from './utils';

/**
* The props of the {@link Skeleton} component.
Expand All @@ -15,7 +11,7 @@ export type SkeletonBorderRadius = 'none' | 'medium' | 'full' | undefined;
export type SkeletonProps = {
width: number | string;
height: number | string;
borderRadius?: SkeletonBorderRadius | undefined;
borderRadius?: BorderRadius | undefined;
};

const TYPE = 'Skeleton';
Expand All @@ -28,7 +24,7 @@ const TYPE = 'Skeleton';
* @param props.width - Height of the Skeleton.
* @param props.borderRadius - Border radius of the Skeleton.
* @example
* <Skeleton height={32} width={50%} />
* <Skeleton height={32} width="50%" />
*/
export const Skeleton = createSnapComponent<SkeletonProps, typeof TYPE>(TYPE);

Expand Down
4 changes: 4 additions & 0 deletions packages/snaps-sdk/src/jsx/components/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Definition of border radius.
*/
export type BorderRadius = 'none' | 'medium' | 'full' | undefined;

0 comments on commit 20007bb

Please sign in to comment.