Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

switch to the new Text

Roman Pominov364e6384e108
diff --git a/packages/design-system/src/components/text.tsx b/packages/design-system/src/components/text.tsx
index 3fbad27da7..b8f3931900 100644
--- a/packages/design-system/src/components/text.tsx
+++ b/packages/design-system/src/components/text.tsx
@@ -45,6 +45,14 @@ export const Text = styled("div", {
textTransform: "uppercase",
},
},
+ color: {
+ contrast: {
+ color: "$hiContrast",
+ },
+ loContrast: {
+ color: "$loContrast",
+ },
+ },
},
defaultVariants: {
diff --git a/packages/design-system/src/components/tree/tree-node.tsx b/packages/design-system/src/components/tree/tree-node.tsx
index a59709afac..431d39b232 100644
--- a/packages/design-system/src/components/tree/tree-node.tsx
+++ b/packages/design-system/src/components/tree/tree-node.tsx
@@ -3,7 +3,7 @@ import { TriangleRightIcon, TriangleDownIcon } from "@webstudio-is/icons";
import { Box } from "../box";
import * as Collapsible from "@radix-ui/react-collapsible";
import { Flex } from "../flex";
-import { __DEPRECATED__Text } from "../__DEPRECATED__/text";
+import { Text } from "../text";
import { keyframes, styled } from "../../stitches.config";
export const INDENT = 16;
@@ -270,7 +270,7 @@ export const TreeNode = <Data extends { id: string }>({
);
};
-const Label = styled(__DEPRECATED__Text, {
+const Label = styled(Text, {
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis",
@@ -298,11 +298,7 @@ export const TreeNodeLabel = ({
isSelected: boolean;
withIcon?: boolean;
}) => (
- <Label
- size="1"
- variant={isSelected ? "loContrast" : "contrast"}
- withIcon={withIcon}
- >
+ <Label color={isSelected ? "loContrast" : "contrast"} withIcon={withIcon}>
{text}
</Label>
);