From 886e1bccf494706fd707826973b8ead0df093e4c Mon Sep 17 00:00:00 2001 From: malangcat Date: Tue, 21 Jan 2025 18:33:22 +0900 Subject: [PATCH] fix: error state layout --- docs/public/__registry__/ui/error-state.json | 2 +- docs/registry/ui/error-state.tsx | 2 +- examples/stackflow-spa/src/design-system/ui/error-state.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/public/__registry__/ui/error-state.json b/docs/public/__registry__/ui/error-state.json index c0edcd175..9423c8c95 100644 --- a/docs/public/__registry__/ui/error-state.json +++ b/docs/public/__registry__/ui/error-state.json @@ -10,7 +10,7 @@ { "name": "error-state.tsx", "type": "ui", - "content": "\"use client\";\n\nimport { Box, Stack, Text } from \"@seed-design/react\";\nimport * as React from \"react\";\nimport { ActionButton, type ActionButtonProps } from \"./action-button\";\n\nexport interface ErrorStateProps\n extends Omit, \"title\" | \"color\"> {\n title?: React.ReactNode;\n\n description?: React.ReactNode;\n\n primaryActionProps?: ActionButtonProps;\n\n secondaryActionProps?: React.ButtonHTMLAttributes;\n\n /**\n * @default \"default\"\n */\n variant?: \"default\" | \"basement\";\n}\n\nconst bg = {\n default: \"bg.layerDefault\",\n basement: \"bg.neutralWeak\",\n} as const;\n\nconst primaryActionVariant = {\n default: \"neutralWeak\",\n basement: \"neutralOutline\",\n} as const;\n\n/**\n * @see https://v3.seed-design.io/docs/react/components/error-state\n */\nexport const ErrorState = React.forwardRef(\n (props, ref) => {\n const {\n title,\n description,\n primaryActionProps,\n secondaryActionProps,\n variant = \"default\",\n ...otherProps\n } = props;\n const { children: secondaryActionLabel, ...secondaryActionOtherProps } =\n secondaryActionProps || {};\n\n return (\n \n \n \n {title}\n \n \n {description}\n \n \n \n {primaryActionProps && (\n \n )}\n {secondaryActionProps && (\n \n )}\n \n \n );\n },\n);\nErrorState.displayName = \"ErrorState\";\n\n/**\n * This file is generated snippet from the Seed Design.\n * You can extend the functionality from this snippet if needed.\n */\n" + "content": "\"use client\";\n\nimport { Box, Stack, Text } from \"@seed-design/react\";\nimport * as React from \"react\";\nimport { ActionButton, type ActionButtonProps } from \"./action-button\";\n\nexport interface ErrorStateProps\n extends Omit, \"title\" | \"color\"> {\n title?: React.ReactNode;\n\n description?: React.ReactNode;\n\n primaryActionProps?: ActionButtonProps;\n\n secondaryActionProps?: React.ButtonHTMLAttributes;\n\n /**\n * @default \"default\"\n */\n variant?: \"default\" | \"basement\";\n}\n\nconst bg = {\n default: \"bg.layerDefault\",\n basement: \"bg.neutralWeak\",\n} as const;\n\nconst primaryActionVariant = {\n default: \"neutralWeak\",\n basement: \"neutralOutline\",\n} as const;\n\n/**\n * @see https://v3.seed-design.io/docs/react/components/error-state\n */\nexport const ErrorState = React.forwardRef(\n (props, ref) => {\n const {\n title,\n description,\n primaryActionProps,\n secondaryActionProps,\n variant = \"default\",\n ...otherProps\n } = props;\n const { children: secondaryActionLabel, ...secondaryActionOtherProps } =\n secondaryActionProps || {};\n\n return (\n \n \n \n {title}\n \n \n {description}\n \n \n \n {primaryActionProps && (\n \n )}\n {secondaryActionProps && (\n \n )}\n \n \n );\n },\n);\nErrorState.displayName = \"ErrorState\";\n\n/**\n * This file is generated snippet from the Seed Design.\n * You can extend the functionality from this snippet if needed.\n */\n" } ] } \ No newline at end of file diff --git a/docs/registry/ui/error-state.tsx b/docs/registry/ui/error-state.tsx index b6223b09f..4d7209672 100644 --- a/docs/registry/ui/error-state.tsx +++ b/docs/registry/ui/error-state.tsx @@ -68,7 +68,7 @@ export const ErrorState = React.forwardRef( {description} - + {primaryActionProps && ( ((pro {description} - + {primaryActionProps && ( )}