mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: data-driven tools
This commit is contained in:
1 parent
58b5ee7f83
commit
84dc5e4960
14 files changed
+118
-135
No files matched your search
@@ -1,6 +1,13 @@
|
||||
---
|
||||
import { CaretRightIcon } from "@radix-ui/react-icons";
|
||||
import { Box, Button, Flex, Heading, Text } from "@radix-ui/themes";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Flex,
|
||||
Heading,
|
||||
Text,
|
||||
type ButtonProps,
|
||||
} from "@radix-ui/themes";
|
||||
import type { Tool } from "../constants/tools";
|
||||
import { getStrings } from "../core/i18n/getStrings";
|
||||
import { LinkI18n } from "./LinkI18n";
|
||||
@@ -45,7 +52,9 @@ const toolStrings =
|
||||
</style>
|
||||
|
||||
<Flex
|
||||
style={{ backgroundImage: `url(/assets/images/tools/${tool.id}.webp)` }}
|
||||
style={{
|
||||
backgroundImage: `url(/assets/images/tools/${tool.id}.webp)`,
|
||||
}}
|
||||
data-significant={tool.significant}
|
||||
className="container"
|
||||
position="relative"
|
||||
@@ -105,12 +114,11 @@ const toolStrings =
|
||||
</Flex>
|
||||
|
||||
<Button
|
||||
highContrast={tool.button.highContrast}
|
||||
size={{
|
||||
initial: undefined,
|
||||
sm: tool.significant ? "3" : undefined,
|
||||
}}
|
||||
color={tool.button.color}
|
||||
color={tool.button as ButtonProps["color"]}
|
||||
style={{ cursor: "inherit" }}
|
||||
>
|
||||
{toolStrings.button}
|
||||
|
||||
Reference in new issue
Block a user