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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
refix without additional text node
Oleg Isonen2d849e309391
diff --git a/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx b/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsxindex 41f7ec3e77..e877bb683a 100644--- a/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx+++ b/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx@@ -9,7 +9,8 @@ import {SelectItem,SelectContent,TextFieldIconButton,- Text,+ styled,+ textStyles,} from "@webstudio-is/design-system";import { ChevronDownIcon, ChevronUpIcon } from "@webstudio-is/icons";import { isValid } from "../parse-css-value";@@ -90,13 +91,9 @@ export const useUnitSelect = ({return [isOpen, select];};-const StyledTrigger = ({ children }: { children: JSX.Element }) => {- return (- <TextFieldIconButton css={{ px: "$spacing$2" }}>- <Text variant="unit">{children}</Text>- </TextFieldIconButton>- );-};+const StyledTrigger = styled(TextFieldIconButton, textStyles, {+ px: 3,+});type UnitSelectProps = {options: Array<string>;@@ -123,7 +120,7 @@ const UnitSelect = ({open={open}><SelectPrimitive.SelectTrigger asChild>- <StyledTrigger>+ <StyledTrigger variant="unit"><SelectPrimitive.Value>{value}</SelectPrimitive.Value></StyledTrigger></SelectPrimitive.SelectTrigger>diff --git a/packages/design-system/src/components/text.tsx b/packages/design-system/src/components/text.tsxindex caf5e19374..67d77a4b2c 100644--- a/packages/design-system/src/components/text.tsx+++ b/packages/design-system/src/components/text.tsx@@ -1,9 +1,6 @@-import { styled } from "../stitches.config";+import { css, styled } from "../stitches.config";-/**- * For use as a standalone, single-line text element. If you need a multiline element - use Paragraph.- */-export const Text = styled("div", {+export const textStyles = css({// Resetmargin: 0,lineHeight: 1,@@ -95,3 +92,8 @@ export const Text = styled("div", {variant: "regular",},});++/**+ * For use as a standalone, single-line text element. If you need a multiline element - use Paragraph.+ */+export const Text = styled("div", textStyles);