Skip to content

Commit f8b67d8

Browse files
committed
feat: 首页工具卡片优化
1 parent 95abe3c commit f8b67d8

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

frontend/src/components/ToolCard.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Badge, Column, Icon, LargeText, Row, Text } from "@sscreator/ui";
2-
import { AiOutlineRight } from "react-icons/ai";
1+
import { Badge, Card, Column, Icon, LargeText, Row, Text } from "@sscreator/ui";
2+
import { MdKeyboardArrowRight } from "react-icons/md";
33
import { useLocation } from "wouter-preact";
44

55
interface Props {
@@ -21,23 +21,22 @@ export default function ToolCard({
2121
return (
2222
<button
2323
type="button"
24+
className={unavaliable ? "cursor-not-allowed" : undefined}
2425
onClick={!unavaliable ? () => setLocation(path) : undefined}
2526
>
26-
<Row className="justify-between" itemsCenter>
27-
<Column className="items-start" gap="gap-2">
27+
<Card className="flex items-center justify-between gap-2" withPadding>
28+
<Column gap="gap-2">
2829
<Row gap="gap-2">
29-
<LargeText className="text-left" bold>
30-
{toolName}
31-
</LargeText>
30+
<LargeText bold>{toolName}</LargeText>
3231
{downgraded && <Badge colorScheme="warning">降级</Badge>}
3332
{unavaliable && <Badge colorScheme="danger">不可用</Badge>}
3433
</Row>
3534
<Text colorScheme="gray" className="text-left">
3635
{description}
3736
</Text>
3837
</Column>
39-
{!unavaliable && <Icon icon={<AiOutlineRight size={24} />} />}
40-
</Row>
38+
{!unavaliable && <Icon icon={<MdKeyboardArrowRight size={36} />} />}
39+
</Card>
4140
</button>
4241
);
4342
}

0 commit comments

Comments
 (0)