From bc2bf2428d507797e4e1e9f497c45ac521a67c8b Mon Sep 17 00:00:00 2001 From: toshick Date: Fri, 5 Apr 2024 07:48:14 +0900 Subject: [PATCH] fix: css of form --- apps/web/app/components/FormPageSection.vue | 55 ++++--------- packages/css/base.css | 2 +- .../ui/components/forms/InputField.stories.ts | 6 +- packages/ui/components/forms/InputField.vue | 75 +++++++++--------- .../ui/components/forms/TextAreaField.vue | 78 +++++++++---------- 5 files changed, 97 insertions(+), 119 deletions(-) diff --git a/apps/web/app/components/FormPageSection.vue b/apps/web/app/components/FormPageSection.vue index 68d3ba08..ce04342d 100644 --- a/apps/web/app/components/FormPageSection.vue +++ b/apps/web/app/components/FormPageSection.vue @@ -36,51 +36,23 @@ const updateDetail = (e: any) => { {{ $t('form.title') }} -
+ }">
- - - + + +
{{ $t('form.submit') }} @@ -103,6 +75,7 @@ section { background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(235, 240, 245, 0.8)); background-blend-mode: soft-light; } + .form-root { display: grid; gap: 40px; @@ -111,27 +84,33 @@ section { width: 100%; grid-template-columns: minmax(0, 1fr); } + .title { text-align: center; } + .subtitle { display: grid; place-items: center; gap: 40px; line-height: 1.8; + &::v-deep a { color: var(--color-vue-green); text-decoration: underline; } + &::v-deep a:hover { opacity: 0.4; transition: .2s; } } + form { display: grid; gap: 40px; } + .form-button { margin: 0 auto; width: 260px; diff --git a/packages/css/base.css b/packages/css/base.css index 75796d55..00a91cae 100644 --- a/packages/css/base.css +++ b/packages/css/base.css @@ -6,7 +6,6 @@ --color-white: #fff; --color-vue-blue: #35495e; --color-vue-green: #42b983; - --color-disabled: #c6cacf; /* gradation */ @@ -14,6 +13,7 @@ /* box-shadow */ --box-shadow: 0 2px 10px rgb(53, 73, 95, 0.14); + --box-shadow-input: 0 1px 10px 0 rgb(53, 73, 94, 0.12); /* font */ --font-size-heading800: 5.625rem; diff --git a/packages/ui/components/forms/InputField.stories.ts b/packages/ui/components/forms/InputField.stories.ts index f480dfdf..089ae2a4 100644 --- a/packages/ui/components/forms/InputField.stories.ts +++ b/packages/ui/components/forms/InputField.stories.ts @@ -8,9 +8,9 @@ const meta: Meta = { argTypes: { id: { control: 'text' }, name: { control: 'text' }, - type: { + type: { control: 'radio', - options: ['button', 'checkbox', 'text', 'radio'] + options: ['button', 'checkbox', 'text', 'radio'], }, placeholder: { control: 'text' }, required: { control: 'boolean' }, @@ -30,6 +30,7 @@ export const Default: Story = { id: 'default', name: 'default', label: 'お名前', + placeholder: '山田太郎', }, } @@ -39,6 +40,7 @@ export const Error: Story = { id: 'error', name: 'error', label: 'お名前', + placeholder: '山田太郎', errorMessage: 'エラーメッセージが表示されます', }, } diff --git a/packages/ui/components/forms/InputField.vue b/packages/ui/components/forms/InputField.vue index df027d88..8b15b257 100644 --- a/packages/ui/components/forms/InputField.vue +++ b/packages/ui/components/forms/InputField.vue @@ -1,6 +1,6 @@ diff --git a/packages/ui/components/forms/TextAreaField.vue b/packages/ui/components/forms/TextAreaField.vue index 9866177f..b588a3f7 100644 --- a/packages/ui/components/forms/TextAreaField.vue +++ b/packages/ui/components/forms/TextAreaField.vue @@ -1,5 +1,5 @@