Add Container component and fix radius/maxWidth theming
- Drop buttonRadius prop; button now uses --radius via rounded-md - Inject @theme radius mappings into ThemeProvider so rounded-* utilities pick up --radius inside the Tailwind CDN iframe - Add shared Container that consumes --container-max-width set from the global maxWidth prop, replacing ad-hoc "container mx-auto max-w-7xl px-6" wrappers across commerce, landing, footer, navigation, and others - Simplify maxWidth options to Small/Medium/Large/X-Large/Full bleed and shift the scale up so Large (1280px) matches the previous default Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -32,9 +32,8 @@ export const Root: RootConfig<{
|
||||
fgColor: "#0a0a0a",
|
||||
mutedColor: "#f5f5f5",
|
||||
radius: "md",
|
||||
buttonRadius: "md",
|
||||
shadow: "sm",
|
||||
maxWidth: "xl",
|
||||
maxWidth: "lg",
|
||||
},
|
||||
fields: {
|
||||
title: { label: "Page title", type: "text" },
|
||||
@@ -59,17 +58,6 @@ export const Root: RootConfig<{
|
||||
{ label: "Extra large", value: "xl" },
|
||||
],
|
||||
},
|
||||
buttonRadius: {
|
||||
label: "Button radius",
|
||||
type: "select",
|
||||
options: [
|
||||
{ label: "None (square)", value: "none" },
|
||||
{ label: "Small", value: "sm" },
|
||||
{ label: "Medium", value: "md" },
|
||||
{ label: "Large", value: "lg" },
|
||||
{ label: "Extra large", value: "xl" },
|
||||
],
|
||||
},
|
||||
shadow: {
|
||||
label: "Shadow",
|
||||
type: "select",
|
||||
@@ -89,7 +77,6 @@ export const Root: RootConfig<{
|
||||
{ label: "Medium", value: "md" },
|
||||
{ label: "Large", value: "lg" },
|
||||
{ label: "Extra large", value: "xl" },
|
||||
{ label: "2X large", value: "2xl" },
|
||||
{ label: "Full bleed", value: "full" },
|
||||
],
|
||||
},
|
||||
@@ -105,8 +92,8 @@ export const Root: RootConfig<{
|
||||
fgColor,
|
||||
mutedColor,
|
||||
radius,
|
||||
buttonRadius,
|
||||
shadow,
|
||||
maxWidth,
|
||||
}) => {
|
||||
return (
|
||||
<ThemeProvider
|
||||
@@ -119,8 +106,8 @@ export const Root: RootConfig<{
|
||||
fgColor={fgColor}
|
||||
mutedColor={mutedColor}
|
||||
radius={radius}
|
||||
buttonRadius={buttonRadius}
|
||||
shadow={shadow}
|
||||
maxWidth={maxWidth}
|
||||
>
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
|
||||
Reference in New Issue
Block a user