Skip to content

Commit 2050adb

Browse files
committed
ユーザー登録・ログインまわり用の共通コンポーネントを作成
1 parent 04f064a commit 2050adb

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<template>
2+
<v-bottom-sheet
3+
v-model="layer"
4+
persistent
5+
scrollable
6+
:fullscreen="fullscreen"
7+
>
8+
<v-card class="Layer">
9+
<v-card-title class="Layer-CardElements Layer-CardTitle">
10+
<v-container class="Layer-Container">
11+
<div class="Layer-Header">
12+
<span class="TitleEn">{{ titleEn }}</span>
13+
<h2 class="Title">{{ title }}</h2>
14+
</div>
15+
</v-container>
16+
</v-card-title>
17+
<v-card-text class="Layer-CardText">
18+
<v-container class="Layer-FormContainer">
19+
<slot name="LayerContents" />
20+
</v-container>
21+
</v-card-text>
22+
<v-card-actions class="Layer-CardElements Layer-CardActions">
23+
<v-container class="Layer-Container">
24+
<slot name="LayerFooter" />
25+
</v-container>
26+
</v-card-actions>
27+
</v-card>
28+
</v-bottom-sheet>
29+
</template>
30+
31+
<script lang="ts">
32+
import Vue from 'vue'
33+
34+
type DataType = {
35+
layer: boolean
36+
}
37+
38+
export default Vue.extend({
39+
props: {
40+
expanded: {
41+
type: Boolean,
42+
required: false,
43+
default: true
44+
},
45+
title: {
46+
type: String,
47+
required: true
48+
},
49+
titleEn: {
50+
type: String,
51+
required: true
52+
},
53+
fullscreen: {
54+
type: Boolean,
55+
required: false,
56+
default: false
57+
}
58+
},
59+
data(): DataType {
60+
return {
61+
layer: this.expanded
62+
}
63+
},
64+
watch: {
65+
expanded(newValue) {
66+
this.layer = newValue
67+
}
68+
}
69+
})
70+
</script>
71+
72+
<style lang="scss" scoped>
73+
.Layer {
74+
background-color: $color-base-color-07;
75+
border-radius: 24px 24px 0 0 !important;
76+
padding: 16px !important;
77+
}
78+
.Layer-CardElements {
79+
padding: 0 !important;
80+
}
81+
.Layer-CardTitle {
82+
margin-bottom: 16px;
83+
}
84+
.Layer-CardActions {
85+
margin-top: 24px;
86+
}
87+
.Layer-CardText {
88+
padding: 0 !important;
89+
}
90+
.Layer-FormContainer {
91+
padding: 0 !important;
92+
}
93+
.Layer-Container {
94+
padding: 0;
95+
}
96+
.Layer-Header {
97+
display: flex;
98+
flex-direction: column;
99+
align-items: center;
100+
color: $color-white;
101+
border-bottom: 1px solid $color-base-color-01;
102+
padding: 0 0 4px !important;
103+
104+
.TitleEn {
105+
font-size: 12px;
106+
font-weight: bold;
107+
}
108+
109+
.Title {
110+
font-size: 20px;
111+
}
112+
}
113+
</style>

0 commit comments

Comments
 (0)