@@ -4,18 +4,15 @@ import androidx.compose.foundation.background
4
4
import androidx.compose.foundation.layout.Arrangement
5
5
import androidx.compose.foundation.layout.Column
6
6
import androidx.compose.foundation.layout.Row
7
- import androidx.compose.foundation.layout.Spacer
8
- import androidx.compose.foundation.layout.height
9
- import androidx.compose.foundation.layout.width
10
7
import androidx.compose.runtime.Composable
11
8
import androidx.compose.ui.Modifier
12
9
import androidx.compose.ui.graphics.Color.Companion.White
13
10
import androidx.compose.ui.tooling.preview.Preview
14
11
import androidx.compose.ui.unit.dp
15
12
import com.yourssu.handy.compose.HandyTheme
16
- import com.yourssu.handy.compose.button.BoxButton
17
- import com.yourssu.handy.compose.button.BoxButtonSize
18
- import com.yourssu.handy.compose.button.BoxButtonType
13
+ import com.yourssu.handy.compose.button.FilledButton
14
+ import com.yourssu.handy.compose.button.FilledButtonSize
15
+ import com.yourssu.handy.compose.button.FilledButtonType
19
16
import com.yourssu.handy.compose.button.TextButton
20
17
import com.yourssu.handy.compose.button.TextButtonSize
21
18
import com.yourssu.handy.compose.button.TextButtonType
@@ -25,7 +22,7 @@ import com.yourssu.handy.compose.icons.line.ExternalLink
25
22
26
23
@Preview
27
24
@Composable
28
- private fun BoxButtonPreview () {
25
+ private fun FilledButtonPreview () {
29
26
HandyTheme {
30
27
Column (
31
28
modifier = Modifier .background(White ),
@@ -38,179 +35,179 @@ private fun BoxButtonPreview() {
38
35
verticalArrangement = Arrangement .spacedBy(8 .dp)
39
36
) {
40
37
41
- BoxButton (
38
+ FilledButton (
42
39
onClick = {},
43
40
text = " isDisabled" ,
44
41
enabled = false ,
45
- sizeType = BoxButtonSize .XL ,
42
+ sizeType = FilledButtonSize .XL ,
46
43
)
47
44
48
- BoxButton (
45
+ FilledButton (
49
46
onClick = {},
50
47
text = " XL Button" ,
51
- sizeType = BoxButtonSize .XL ,
48
+ sizeType = FilledButtonSize .XL ,
52
49
)
53
50
54
- BoxButton (
51
+ FilledButton (
55
52
onClick = {},
56
53
text = " L Button" ,
57
- sizeType = BoxButtonSize .L ,
54
+ sizeType = FilledButtonSize .L ,
58
55
)
59
56
60
- BoxButton (
57
+ FilledButton (
61
58
onClick = {},
62
59
text = " M Button" ,
63
- sizeType = BoxButtonSize .M ,
60
+ sizeType = FilledButtonSize .M ,
64
61
)
65
62
66
- BoxButton (
63
+ FilledButton (
67
64
onClick = {},
68
65
text = " S Button" ,
69
- sizeType = BoxButtonSize .S ,
66
+ sizeType = FilledButtonSize .S ,
70
67
)
71
68
72
- BoxButton (
69
+ FilledButton (
73
70
onClick = {},
74
71
text = " XS Button" ,
75
- sizeType = BoxButtonSize .XS ,
72
+ sizeType = FilledButtonSize .XS ,
76
73
)
77
74
78
- BoxButton (
75
+ FilledButton (
79
76
onClick = {},
80
77
text = " XXS Button" ,
81
- sizeType = BoxButtonSize .XXS ,
78
+ sizeType = FilledButtonSize .XXS ,
82
79
)
83
80
}
84
81
Column (
85
82
verticalArrangement = Arrangement .spacedBy(8 .dp)
86
83
87
84
) {
88
- BoxButton (
85
+ FilledButton (
89
86
onClick = {},
90
- buttonType = BoxButtonType .Secondary ,
87
+ buttonType = FilledButtonType .Secondary ,
91
88
text = " isDisabled" ,
92
89
enabled = false ,
93
- sizeType = BoxButtonSize .XL ,
90
+ sizeType = FilledButtonSize .XL ,
94
91
)
95
92
96
- BoxButton (
93
+ FilledButton (
97
94
onClick = {},
98
95
text = " XL Button" ,
99
- buttonType = BoxButtonType .Secondary ,
100
- sizeType = BoxButtonSize .XL ,
96
+ buttonType = FilledButtonType .Secondary ,
97
+ sizeType = FilledButtonSize .XL ,
101
98
)
102
99
103
- BoxButton (
100
+ FilledButton (
104
101
onClick = {},
105
102
text = " L Button" ,
106
- buttonType = BoxButtonType .Secondary ,
107
- sizeType = BoxButtonSize .L ,
103
+ buttonType = FilledButtonType .Secondary ,
104
+ sizeType = FilledButtonSize .L ,
108
105
)
109
106
110
- BoxButton (
107
+ FilledButton (
111
108
onClick = {},
112
109
text = " M Button" ,
113
- buttonType = BoxButtonType .Secondary ,
114
- sizeType = BoxButtonSize .M ,
110
+ buttonType = FilledButtonType .Secondary ,
111
+ sizeType = FilledButtonSize .M ,
115
112
)
116
113
117
- BoxButton (
114
+ FilledButton (
118
115
onClick = {},
119
116
text = " S Button" ,
120
- buttonType = BoxButtonType .Secondary ,
121
- sizeType = BoxButtonSize .S ,
117
+ buttonType = FilledButtonType .Secondary ,
118
+ sizeType = FilledButtonSize .S ,
122
119
)
123
120
124
- BoxButton (
121
+ FilledButton (
125
122
onClick = {},
126
123
text = " XS Button" ,
127
- buttonType = BoxButtonType .Secondary ,
128
- sizeType = BoxButtonSize .XS ,
124
+ buttonType = FilledButtonType .Secondary ,
125
+ sizeType = FilledButtonSize .XS ,
129
126
)
130
127
131
- BoxButton (
128
+ FilledButton (
132
129
onClick = {},
133
130
text = " XXS Button" ,
134
- buttonType = BoxButtonType .Secondary ,
135
- sizeType = BoxButtonSize .XXS ,
131
+ buttonType = FilledButtonType .Secondary ,
132
+ sizeType = FilledButtonSize .XXS ,
136
133
)
137
134
}
138
135
Column (
139
136
verticalArrangement = Arrangement .spacedBy(8 .dp)
140
137
) {
141
- BoxButton (
138
+ FilledButton (
142
139
onClick = {},
143
- buttonType = BoxButtonType . Tertiary ,
140
+ buttonType = FilledButtonType . Outlined ,
144
141
text = " isDisabled" ,
145
142
enabled = false ,
146
- sizeType = BoxButtonSize .XL ,
143
+ sizeType = FilledButtonSize .XL ,
147
144
)
148
145
149
- BoxButton (
146
+ FilledButton (
150
147
onClick = {},
151
148
text = " XL Button" ,
152
- buttonType = BoxButtonType . Tertiary ,
153
- sizeType = BoxButtonSize .XL ,
149
+ buttonType = FilledButtonType . Outlined ,
150
+ sizeType = FilledButtonSize .XL ,
154
151
)
155
152
156
- BoxButton (
153
+ FilledButton (
157
154
onClick = {},
158
155
text = " L Button" ,
159
- buttonType = BoxButtonType . Tertiary ,
160
- sizeType = BoxButtonSize .L ,
156
+ buttonType = FilledButtonType . Outlined ,
157
+ sizeType = FilledButtonSize .L ,
161
158
)
162
159
163
- BoxButton (
160
+ FilledButton (
164
161
onClick = {},
165
162
text = " M Button" ,
166
- buttonType = BoxButtonType . Tertiary ,
167
- sizeType = BoxButtonSize .M ,
163
+ buttonType = FilledButtonType . Outlined ,
164
+ sizeType = FilledButtonSize .M ,
168
165
)
169
166
170
- BoxButton (
167
+ FilledButton (
171
168
onClick = {},
172
169
text = " S Button" ,
173
- buttonType = BoxButtonType . Tertiary ,
174
- sizeType = BoxButtonSize .S ,
170
+ buttonType = FilledButtonType . Outlined ,
171
+ sizeType = FilledButtonSize .S ,
175
172
)
176
173
177
- BoxButton (
174
+ FilledButton (
178
175
onClick = {},
179
176
text = " XS Button" ,
180
- buttonType = BoxButtonType . Tertiary ,
181
- sizeType = BoxButtonSize .XS ,
177
+ buttonType = FilledButtonType . Outlined ,
178
+ sizeType = FilledButtonSize .XS ,
182
179
)
183
180
184
- BoxButton (
181
+ FilledButton (
185
182
onClick = {},
186
183
text = " XXS Button" ,
187
- buttonType = BoxButtonType . Tertiary ,
188
- sizeType = BoxButtonSize .XXS ,
184
+ buttonType = FilledButtonType . Outlined ,
185
+ sizeType = FilledButtonSize .XXS ,
189
186
)
190
187
}
191
188
}
192
189
Row (
193
190
horizontalArrangement = Arrangement .spacedBy(8 .dp),
194
191
) {
195
- BoxButton (
192
+ FilledButton (
196
193
onClick = {},
197
194
text = " M Button" ,
198
- sizeType = BoxButtonSize .S ,
195
+ sizeType = FilledButtonSize .S ,
199
196
leftIcon = HandyIcons .Line .Add ,
200
197
enabled = false ,
201
198
)
202
199
203
- BoxButton (
200
+ FilledButton (
204
201
onClick = {},
205
202
text = " M Button" ,
206
- sizeType = BoxButtonSize .S ,
203
+ sizeType = FilledButtonSize .S ,
207
204
rightIcon = HandyIcons .Line .Add ,
208
205
enabled = false ,
209
206
)
210
- BoxButton (
207
+ FilledButton (
211
208
onClick = {},
212
209
text = " M Button" ,
213
- sizeType = BoxButtonSize .S ,
210
+ sizeType = FilledButtonSize .S ,
214
211
leftIcon = HandyIcons .Line .Add ,
215
212
rightIcon = HandyIcons .Line .Add ,
216
213
enabled = false ,
@@ -219,88 +216,88 @@ private fun BoxButtonPreview() {
219
216
Row (
220
217
horizontalArrangement = Arrangement .spacedBy(8 .dp),
221
218
) {
222
- BoxButton (
219
+ FilledButton (
223
220
onClick = {},
224
221
text = " M Button" ,
225
- sizeType = BoxButtonSize .S ,
222
+ sizeType = FilledButtonSize .S ,
226
223
leftIcon = HandyIcons .Line .Add ,
227
224
)
228
225
229
- BoxButton (
226
+ FilledButton (
230
227
onClick = {},
231
228
text = " M Button" ,
232
- sizeType = BoxButtonSize .S ,
229
+ sizeType = FilledButtonSize .S ,
233
230
rightIcon = HandyIcons .Line .Add ,
234
231
)
235
- BoxButton (
232
+ FilledButton (
236
233
onClick = {},
237
234
text = " M Button" ,
238
- sizeType = BoxButtonSize .S ,
235
+ sizeType = FilledButtonSize .S ,
239
236
leftIcon = HandyIcons .Line .Add ,
240
237
rightIcon = HandyIcons .Line .Add ,
241
238
)
242
239
}
243
240
Row (
244
241
horizontalArrangement = Arrangement .spacedBy(8 .dp),
245
242
) {
246
- BoxButton (
243
+ FilledButton (
247
244
onClick = {},
248
245
text = " M Button" ,
249
- sizeType = BoxButtonSize .S ,
250
- buttonType = BoxButtonType .Secondary ,
246
+ sizeType = FilledButtonSize .S ,
247
+ buttonType = FilledButtonType .Secondary ,
251
248
leftIcon = HandyIcons .Line .Add ,
252
249
)
253
250
254
- BoxButton (
251
+ FilledButton (
255
252
onClick = {},
256
253
text = " M Button" ,
257
- sizeType = BoxButtonSize .S ,
258
- buttonType = BoxButtonType .Secondary ,
254
+ sizeType = FilledButtonSize .S ,
255
+ buttonType = FilledButtonType .Secondary ,
259
256
rightIcon = HandyIcons .Line .Add ,
260
257
)
261
- BoxButton (
258
+ FilledButton (
262
259
onClick = {},
263
260
text = " M Button" ,
264
- sizeType = BoxButtonSize .S ,
265
- buttonType = BoxButtonType .Secondary ,
261
+ sizeType = FilledButtonSize .S ,
262
+ buttonType = FilledButtonType .Secondary ,
266
263
leftIcon = HandyIcons .Line .Add ,
267
264
rightIcon = HandyIcons .Line .Add ,
268
265
)
269
266
}
270
267
Row (
271
268
horizontalArrangement = Arrangement .spacedBy(8 .dp),
272
269
){
273
- BoxButton (
270
+ FilledButton (
274
271
onClick = {},
275
272
text = " M Button" ,
276
- sizeType = BoxButtonSize .S ,
277
- buttonType = BoxButtonType . Tertiary ,
273
+ sizeType = FilledButtonSize .S ,
274
+ buttonType = FilledButtonType . Outlined ,
278
275
leftIcon = HandyIcons .Line .Add ,
279
276
)
280
277
281
- BoxButton (
278
+ FilledButton (
282
279
onClick = {},
283
280
text = " M Button" ,
284
- sizeType = BoxButtonSize .S ,
285
- buttonType = BoxButtonType . Tertiary ,
281
+ sizeType = FilledButtonSize .S ,
282
+ buttonType = FilledButtonType . Outlined ,
286
283
rightIcon = HandyIcons .Line .Add ,
287
284
)
288
- BoxButton (
285
+ FilledButton (
289
286
onClick = {},
290
287
text = " M Button" ,
291
- sizeType = BoxButtonSize .S ,
292
- buttonType = BoxButtonType . Tertiary ,
288
+ sizeType = FilledButtonSize .S ,
289
+ buttonType = FilledButtonType . Outlined ,
293
290
leftIcon = HandyIcons .Line .Add ,
294
291
rightIcon = HandyIcons .Line .Add ,
295
292
)
296
293
}
297
294
Row (
298
295
horizontalArrangement = Arrangement .spacedBy(8 .dp),
299
296
) {
300
- BoxButton (
297
+ FilledButton (
301
298
onClick = {},
302
299
text = " M Button" ,
303
- sizeType = BoxButtonSize .M ,
300
+ sizeType = FilledButtonSize .M ,
304
301
leftIcon = HandyIcons .Line .Add ,
305
302
horizontalPadding = 100 .dp
306
303
)
0 commit comments