Skip to content

Commit 2e88b2a

Browse files
committed
fix
1 parent 9aa4275 commit 2e88b2a

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

packages/ui/components/common/StatusCard.stories.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ export const Error = Template.bind({})
3232
Error.args = {
3333
hasError: true,
3434
title: '印刷工程の都合上、ネームカードの編集期限後は編集できなくなります。当日会場にてネームカードをご希望の方は期限までに編集を完了させてください。',
35+
content: 'ネームカード編集期限:\n2024年9月16日(月祝)24:00',
3536
}
Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<script setup lang="ts">
2+
import { useColor } from '@vuejs-jp/composable'
23
import Icon from '../icon/Icon.vue'
34
45
interface StatusCardProps {
56
hasError: boolean
67
title: string
8+
content?: string
79
}
810
911
const props = defineProps<StatusCardProps>()
12+
13+
const { color } = useColor()
1014
</script>
1115

1216
<template>
@@ -16,37 +20,64 @@ const props = defineProps<StatusCardProps>()
1620
background: hasError ? '#FFDAD6' : '#E7EFF7',
1721
}"
1822
>
19-
<Icon v-if="hasError" :style="{ width: '80px' }" color="vue-blue" name="alert" />
20-
<p
21-
class="title"
23+
<div class="status-card-body">
24+
<Icon v-if="hasError" :style="{ width: '80px' }" color="vue-blue" name="alert" />
25+
<p
26+
class="title"
27+
:style="{
28+
fontWeight: hasError ? 700 : 500,
29+
}"
30+
>
31+
{{ title }}
32+
</p>
33+
</div>
34+
<div
35+
v-if="content"
36+
class="status-card-content"
2237
:style="{
23-
fontWeight: hasError ? 700 : 500,
38+
color: color('sangosyo/200'),
2439
}"
2540
>
26-
{{ title }}
27-
</p>
41+
{{ content }}
42+
</div>
2843
</div>
2944
</template>
3045

3146
<style scoped>
3247
.status-card {
33-
display: flex;
34-
gap: calc(var(--unit) * 1);
48+
display: grid;
49+
place-items: center;
50+
gap: calc(var(--unit) * 1.5);
3551
padding: calc(var(--unit) * 3) calc(var(--unit) * 4);
3652
max-width: 760px;
3753
color: var(--color-vue-blue);
3854
border-radius: 8px;
3955
}
4056
57+
.status-card-body {
58+
display: flex;
59+
gap: calc(var(--unit) * 1);
60+
}
61+
4162
.title {
4263
padding: 0;
4364
margin: 0;
4465
font-size: 18px;
4566
}
4667
68+
.status-card-content {
69+
font-size: 18px;
70+
font-weight: 700;
71+
}
72+
4773
@media screen and (max-width: 768px) {
4874
.status-card {
4975
width: 100%;
5076
}
77+
78+
.status-card-content {
79+
text-align: center;
80+
white-space: pre-wrap;
81+
}
5182
}
5283
</style>

0 commit comments

Comments
 (0)