diff --git a/web/src/components/ui/card/CardBase.tsx b/web/src/components/ui/card/CardBase.tsx index 569c38d8d..56f27ec83 100644 --- a/web/src/components/ui/card/CardBase.tsx +++ b/web/src/components/ui/card/CardBase.tsx @@ -5,6 +5,7 @@ import { cn } from '@/lib/utils'; const sizeVariants = cva('', { variants: { size: { + xsmall: 'h-[32px] min-h-[32px] px-2.5', small: 'p-2.5', default: 'p-4' } diff --git a/web/src/components/ui/card/CodeCard.tsx b/web/src/components/ui/card/CodeCard.tsx index c96876632..62db18684 100644 --- a/web/src/components/ui/card/CodeCard.tsx +++ b/web/src/components/ui/card/CodeCard.tsx @@ -1,11 +1,12 @@ import { createStyles } from 'antd-style'; import React from 'react'; -import { Text } from '@/components/ui'; import { AppCodeEditor } from '../inputs/AppCodeEditor'; -import { Button } from 'antd'; -import { AppMaterialIcons } from '../icons'; import { useMemoizedFn } from 'ahooks'; import { useBusterNotifications } from '@/context/BusterNotifications'; +import { cn } from '@/lib/classMerge'; +import { Button } from '../buttons/Button'; +import { Card, CardHeader, CardContent, CardDescription, CardFooter, CardTitle } from './CardBase'; +import { Download, Copy } from '../icons'; export const CodeCard: React.FC<{ code: string; @@ -33,27 +34,26 @@ export const CodeCard: React.FC<{ const ShownButtons = buttons === true ? : buttons; return ( -
-
- {fileName} - - {ShownButtons} -
-
- -
-
+ + +
+ {fileName} + {ShownButtons} +
+
+ +
+ +
+
+
); }; @@ -90,15 +90,10 @@ const CardButtons: React.FC<{ return (
+