Skip to content

Commit 90008cc

Browse files
author
taku10101
committed
add:Stepper
1 parent a104cc7 commit 90008cc

File tree

3 files changed

+546
-0
lines changed

3 files changed

+546
-0
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
/*
2+
Installed from https://reactbits.dev/ts/default/
3+
*/
4+
5+
.outer-container {
6+
display: flex;
7+
min-height: 100%;
8+
flex: 1 1 0%;
9+
flex-direction: column;
10+
align-items: center;
11+
justify-content: center;
12+
padding: 1rem;
13+
}
14+
15+
@media (min-width: 640px) {
16+
.outer-container {
17+
aspect-ratio: 4 / 3;
18+
}
19+
}
20+
21+
@media (min-width: 768px) {
22+
.outer-container {
23+
aspect-ratio: 2 / 1;
24+
}
25+
}
26+
27+
.step-circle-container {
28+
margin-left: auto;
29+
margin-right: auto;
30+
width: 100%;
31+
max-width: 28rem;
32+
border-radius: 2rem;
33+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px
34+
rgba(0, 0, 0, 0.04);
35+
}
36+
37+
.step-indicator-row {
38+
display: flex;
39+
width: 100%;
40+
align-items: center;
41+
padding: 2rem;
42+
}
43+
44+
.step-content-default {
45+
position: relative;
46+
overflow: hidden;
47+
}
48+
49+
.step-default {
50+
padding-left: 2rem;
51+
padding-right: 2rem;
52+
}
53+
54+
.footer-container {
55+
padding-left: 2rem;
56+
padding-right: 2rem;
57+
padding-bottom: 2rem;
58+
}
59+
60+
.footer-nav {
61+
margin-top: 2.5rem;
62+
display: flex;
63+
}
64+
65+
.footer-nav.spread {
66+
justify-content: space-between;
67+
}
68+
69+
.footer-nav.end {
70+
justify-content: flex-end;
71+
}
72+
73+
.back-button {
74+
transition: all 350ms;
75+
border-radius: 0.25rem;
76+
padding: 0.25rem 0.5rem;
77+
color: #a3a3a3;
78+
cursor: pointer;
79+
}
80+
81+
.back-button:hover {
82+
color: #52525b;
83+
}
84+
85+
.back-button.inactive {
86+
pointer-events: none;
87+
opacity: 0.5;
88+
color: #a3a3a3;
89+
}
90+
91+
.next-button {
92+
transition: all 350ms;
93+
display: flex;
94+
align-items: center;
95+
justify-content: center;
96+
border-radius: 9999px;
97+
background-color: #00d8ff;
98+
color: #060606;
99+
font-weight: 500;
100+
letter-spacing: -0.025em;
101+
padding: 0.375rem 0.875rem;
102+
cursor: pointer;
103+
}
104+
105+
.next-button:hover {
106+
background-color: #00d8ff;
107+
}
108+
109+
.next-button:active {
110+
background-color: #00d8ff;
111+
}
112+
113+
.step-indicator {
114+
position: relative;
115+
cursor: pointer;
116+
outline: none;
117+
}
118+
119+
.step-indicator-inner {
120+
display: flex;
121+
height: 2rem;
122+
width: 2rem;
123+
align-items: center;
124+
justify-content: center;
125+
border-radius: 9999px;
126+
font-weight: 600;
127+
}
128+
129+
.active-dot {
130+
height: 0.75rem;
131+
width: 0.75rem;
132+
border-radius: 9999px;
133+
background-color: #060606;
134+
}
135+
136+
.step-number {
137+
font-size: 0.875rem;
138+
}
139+
140+
.step-connector {
141+
position: relative;
142+
margin-left: 0.5rem;
143+
margin-right: 0.5rem;
144+
height: 0.125rem;
145+
flex: 1;
146+
overflow: hidden;
147+
border-radius: 0.25rem;
148+
background-color: #52525b;
149+
}
150+
151+
.step-connector-inner {
152+
position: absolute;
153+
left: 0;
154+
top: 0;
155+
height: 100%;
156+
}
157+
158+
.check-icon {
159+
height: 1rem;
160+
width: 1rem;
161+
color: #000;
162+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from 'react';
2+
import Stepper from './Stepper';
3+
4+
export default {
5+
title: 'Components/Stepper',
6+
component: Stepper,
7+
}
8+
9+
const Template = (args: React.ComponentProps<typeof Stepper>) => <Stepper {...args} />;
10+
11+
export const Default = Template.bind({});
12+
13+
14+
// 必要に応じて他のバリエーションを追加します

0 commit comments

Comments
 (0)