File tree Expand file tree Collapse file tree 2 files changed +87
-0
lines changed
packages/ui/components/common Expand file tree Collapse file tree 2 files changed +87
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { StoryFn } from '@storybook/vue3'
2
+ import StatusCard from './StatusCard.vue'
3
+
4
+ export default {
5
+ title : 'common/StatusCard' ,
6
+ component : StatusCard ,
7
+ args : {
8
+ title : 'これから注文番号の照合を行います。注文番号照合の状況はネームカードページのステータスで確認できます。編集期限前に照合が正常に完了したことを確認してください。' ,
9
+ } ,
10
+ argTypes : {
11
+ color : {
12
+ description : 'The color property' ,
13
+ control : {
14
+ type : 'text' ,
15
+ } ,
16
+ } ,
17
+ } ,
18
+ }
19
+
20
+ const Template : StoryFn < unknown > = ( args , { argTypes } ) => ( {
21
+ props : Object . keys ( argTypes ) ,
22
+ components : { StatusCard } ,
23
+ setup ( ) {
24
+ return { args }
25
+ } ,
26
+ template : '<StatusCard v-bind="args" />' ,
27
+ } )
28
+
29
+ export const Default = Template . bind ( { } )
30
+
31
+ export const Error = Template . bind ( { } )
32
+ Error . args = {
33
+ hasError : true ,
34
+ title : '印刷工程の都合上、ネームカードの編集期限後は編集できなくなります。当日会場にてネームカードをご希望の方は期限までに編集を完了させてください。' ,
35
+ }
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import Icon from ' ../icon/Icon.vue'
3
+
4
+ interface StatusCardProps {
5
+ hasError: boolean
6
+ title: string
7
+ }
8
+
9
+ const props = defineProps <StatusCardProps >()
10
+ </script >
11
+
12
+ <template >
13
+ <div
14
+ class =" status-card"
15
+ :style =" {
16
+ background: hasError ? '#FFDAD6' : '#E7EFF7',
17
+ }"
18
+ >
19
+ <Icon v-if =" hasError" :style =" { width: '80px' }" color =" vue-blue" name =" alert" />
20
+ <p
21
+ class =" title"
22
+ :style =" {
23
+ fontWeight: hasError ? 700 : 500,
24
+ }"
25
+ >
26
+ {{ title }}
27
+ </p >
28
+ </div >
29
+ </template >
30
+
31
+ <style scoped>
32
+ .status-card {
33
+ display : flex ;
34
+ gap : calc (var (--unit ) * 1 );
35
+ padding : calc (var (--unit ) * 3 ) calc (var (--unit ) * 4 );
36
+ max-width : 760px ;
37
+ color : var (--color-vue-blue );
38
+ border-radius : 8px ;
39
+ }
40
+
41
+ .title {
42
+ padding : 0 ;
43
+ margin : 0 ;
44
+ font-size : 18px ;
45
+ }
46
+
47
+ @media screen and (max-width : 768px ) {
48
+ .status-card {
49
+ width : 100% ;
50
+ }
51
+ }
52
+ </style >
You can’t perform that action at this time.
0 commit comments