Skip to content

Commit

Permalink
chore: remove radix-ui/themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokyeom committed Oct 21, 2024
1 parent d88bfc2 commit 9224838
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 817 deletions.
24 changes: 10 additions & 14 deletions packages/ui/Skeleton/Skeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import type { SkeletonProps as RadixSkeletonProps } from '@radix-ui/themes';
import { Skeleton as RadixSkeleton } from '@radix-ui/themes';
import '@radix-ui/themes/styles.css';
import { colors } from '@sopt-makers/colors';
import type { HTMLAttributes, ReactNode } from 'react';
import { forwardRef } from 'react';

export type SkeletonProps = RadixSkeletonProps;
export interface SkeletonProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
children: ReactNode;
width: number | string;
height: number | string;
variant: 'circular' | 'rectangular' | 'rounded' | 'text';
animation: 'pulse' | 'wave';
}

/**
* - 자세한 옵션은 [radix-ui/Skeleton](https://www.radix-ui.com/themes/docs/components/skeleton)문서를 참고해주세요.
*/
export const Skeleton = forwardRef<HTMLSpanElement, SkeletonProps>((props, forwardedRef) => {
const { children, ...restProps } = props;

return (
<RadixSkeleton
ref={forwardedRef}
style={{ backgroundColor: colors.gray700, borderRadius: '9999px' }}
{...restProps}
>
<span ref={forwardedRef} {...restProps}>
{children}
</RadixSkeleton>
</span>
);
});

Expand Down
1 change: 0 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"dependencies": {
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/themes": "^3.1.4",
"@sopt-makers/colors": "workspace:^",
"@sopt-makers/fonts": "workspace:^",
"@sopt-makers/icons": "workspace:^",
Expand Down
Loading

0 comments on commit 9224838

Please sign in to comment.