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.

refix the button sizes, use size 1 as an embeddable size for the input, size 2 standalone

Oleg Isonen2034e8835c30
diff --git a/apps/designer/app/auth/login.tsx b/apps/designer/app/auth/login.tsx
index 0c1bf2fc25..9453ee5d47 100644
--- a/apps/designer/app/auth/login.tsx
+++ b/apps/designer/app/auth/login.tsx
@@ -92,7 +92,7 @@ export const Login = ({ errorMessage }: { errorMessage: string }) => {
placeholder="Auth secret"
css={{ flexGrow: 1 }}
/>
- <Button>Login</Button>
+ <Button size={2}>Login</Button>
</Flex>
) : (
<LoginButton
diff --git a/apps/designer/app/dashboard/components/card.tsx b/apps/designer/app/dashboard/components/card.tsx
index 3ef4dd94d0..9f41c825c2 100644
--- a/apps/designer/app/dashboard/components/card.tsx
+++ b/apps/designer/app/dashboard/components/card.tsx
@@ -69,6 +69,7 @@ export const SelectProjectCard = ({
newProject.length === 0 || transition.state === "submitting"
}
type="submit"
+ size="2"
>
{transition.state === "submitting" ? "Creating..." : "Create"}
</Button>
@@ -80,7 +81,9 @@ export const SelectProjectCard = ({
) : null}
</Form>
) : (
- <Button onClick={handleOpen}>Open</Button>
+ <Button onClick={handleOpen} size="2">
+ Open
+ </Button>
)}
</Flex>
</Card>
diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsx
index 7dd34a8947..f165abd367 100644
--- a/packages/design-system/src/components/button.tsx
+++ b/packages/design-system/src/components/button.tsx
@@ -19,7 +19,7 @@ export const Button = styled("button", {
display: "inline-flex",
flexShrink: 0,
justifyContent: "center",
- lineHeight: "1",
+ lineHeight: 1,
WebkitTapHighlightColor: "rgba(0,0,0,0)",
// Custom
@@ -40,25 +40,22 @@ export const Button = styled("button", {
variants: {
size: {
"1": {
- borderRadius: "$1",
- height: 28, // @todo waiting for the sizing scale
+ borderRadius: 2,
+ height: "$5",
px: "$3",
fontSize: "$1",
- lineHeight: "$sizes$5",
},
"2": {
- borderRadius: "$2",
- height: "$6",
+ borderRadius: "$1",
+ height: 28, // @todo waiting for the sizing scale
px: "$3",
fontSize: "$3",
- lineHeight: "$sizes$6",
},
"3": {
borderRadius: "$2",
height: "$7",
px: "$4",
fontSize: "$4",
- lineHeight: "$sizes$7",
},
},
variant: {
diff --git a/packages/design-system/src/components/select.tsx b/packages/design-system/src/components/select.tsx
index b9a3db5639..02aff00957 100644
--- a/packages/design-system/src/components/select.tsx
+++ b/packages/design-system/src/components/select.tsx
@@ -17,7 +17,7 @@ const StyledTrigger = styled(SelectPrimitive.SelectTrigger, {
backgroundColor: "$loContrast",
color: "$hiContrast",
boxShadow: "inset 0 0 0 1px $colors$slate7",
- height: "$5",
+ height: 28, // @todo waiting for the sizing scale
px: "$2",
fontSize: "$1",
"&:hover": {