Skip to content

Commit 807b5f2

Browse files
authored
feat: button 타입명 변경 (Box -> Filled) (#23)
1 parent e39245a commit 807b5f2

File tree

7 files changed

+146
-149
lines changed

7 files changed

+146
-149
lines changed

app/src/main/kotlin/com/yourssu/handy/demo/ButtonPreview.kt

Lines changed: 92 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ import androidx.compose.foundation.background
44
import androidx.compose.foundation.layout.Arrangement
55
import androidx.compose.foundation.layout.Column
66
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
107
import androidx.compose.runtime.Composable
118
import androidx.compose.ui.Modifier
129
import androidx.compose.ui.graphics.Color.Companion.White
1310
import androidx.compose.ui.tooling.preview.Preview
1411
import androidx.compose.ui.unit.dp
1512
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
1916
import com.yourssu.handy.compose.button.TextButton
2017
import com.yourssu.handy.compose.button.TextButtonSize
2118
import com.yourssu.handy.compose.button.TextButtonType
@@ -25,7 +22,7 @@ import com.yourssu.handy.compose.icons.line.ExternalLink
2522

2623
@Preview
2724
@Composable
28-
private fun BoxButtonPreview() {
25+
private fun FilledButtonPreview() {
2926
HandyTheme {
3027
Column(
3128
modifier = Modifier.background(White),
@@ -38,179 +35,179 @@ private fun BoxButtonPreview() {
3835
verticalArrangement = Arrangement.spacedBy(8.dp)
3936
) {
4037

41-
BoxButton(
38+
FilledButton(
4239
onClick = {},
4340
text = "isDisabled",
4441
enabled = false,
45-
sizeType = BoxButtonSize.XL,
42+
sizeType = FilledButtonSize.XL,
4643
)
4744

48-
BoxButton(
45+
FilledButton(
4946
onClick = {},
5047
text = "XL Button",
51-
sizeType = BoxButtonSize.XL,
48+
sizeType = FilledButtonSize.XL,
5249
)
5350

54-
BoxButton(
51+
FilledButton(
5552
onClick = {},
5653
text = "L Button",
57-
sizeType = BoxButtonSize.L,
54+
sizeType = FilledButtonSize.L,
5855
)
5956

60-
BoxButton(
57+
FilledButton(
6158
onClick = {},
6259
text = "M Button",
63-
sizeType = BoxButtonSize.M,
60+
sizeType = FilledButtonSize.M,
6461
)
6562

66-
BoxButton(
63+
FilledButton(
6764
onClick = {},
6865
text = "S Button",
69-
sizeType = BoxButtonSize.S,
66+
sizeType = FilledButtonSize.S,
7067
)
7168

72-
BoxButton(
69+
FilledButton(
7370
onClick = {},
7471
text = "XS Button",
75-
sizeType = BoxButtonSize.XS,
72+
sizeType = FilledButtonSize.XS,
7673
)
7774

78-
BoxButton(
75+
FilledButton(
7976
onClick = {},
8077
text = "XXS Button",
81-
sizeType = BoxButtonSize.XXS,
78+
sizeType = FilledButtonSize.XXS,
8279
)
8380
}
8481
Column(
8582
verticalArrangement = Arrangement.spacedBy(8.dp)
8683

8784
) {
88-
BoxButton(
85+
FilledButton(
8986
onClick = {},
90-
buttonType = BoxButtonType.Secondary,
87+
buttonType = FilledButtonType.Secondary,
9188
text = "isDisabled",
9289
enabled = false,
93-
sizeType = BoxButtonSize.XL,
90+
sizeType = FilledButtonSize.XL,
9491
)
9592

96-
BoxButton(
93+
FilledButton(
9794
onClick = {},
9895
text = "XL Button",
99-
buttonType = BoxButtonType.Secondary,
100-
sizeType = BoxButtonSize.XL,
96+
buttonType = FilledButtonType.Secondary,
97+
sizeType = FilledButtonSize.XL,
10198
)
10299

103-
BoxButton(
100+
FilledButton(
104101
onClick = {},
105102
text = "L Button",
106-
buttonType = BoxButtonType.Secondary,
107-
sizeType = BoxButtonSize.L,
103+
buttonType = FilledButtonType.Secondary,
104+
sizeType = FilledButtonSize.L,
108105
)
109106

110-
BoxButton(
107+
FilledButton(
111108
onClick = {},
112109
text = "M Button",
113-
buttonType = BoxButtonType.Secondary,
114-
sizeType = BoxButtonSize.M,
110+
buttonType = FilledButtonType.Secondary,
111+
sizeType = FilledButtonSize.M,
115112
)
116113

117-
BoxButton(
114+
FilledButton(
118115
onClick = {},
119116
text = "S Button",
120-
buttonType = BoxButtonType.Secondary,
121-
sizeType = BoxButtonSize.S,
117+
buttonType = FilledButtonType.Secondary,
118+
sizeType = FilledButtonSize.S,
122119
)
123120

124-
BoxButton(
121+
FilledButton(
125122
onClick = {},
126123
text = "XS Button",
127-
buttonType = BoxButtonType.Secondary,
128-
sizeType = BoxButtonSize.XS,
124+
buttonType = FilledButtonType.Secondary,
125+
sizeType = FilledButtonSize.XS,
129126
)
130127

131-
BoxButton(
128+
FilledButton(
132129
onClick = {},
133130
text = "XXS Button",
134-
buttonType = BoxButtonType.Secondary,
135-
sizeType = BoxButtonSize.XXS,
131+
buttonType = FilledButtonType.Secondary,
132+
sizeType = FilledButtonSize.XXS,
136133
)
137134
}
138135
Column(
139136
verticalArrangement = Arrangement.spacedBy(8.dp)
140137
) {
141-
BoxButton(
138+
FilledButton(
142139
onClick = {},
143-
buttonType = BoxButtonType.Tertiary,
140+
buttonType = FilledButtonType.Outlined,
144141
text = "isDisabled",
145142
enabled = false,
146-
sizeType = BoxButtonSize.XL,
143+
sizeType = FilledButtonSize.XL,
147144
)
148145

149-
BoxButton(
146+
FilledButton(
150147
onClick = {},
151148
text = "XL Button",
152-
buttonType = BoxButtonType.Tertiary,
153-
sizeType = BoxButtonSize.XL,
149+
buttonType = FilledButtonType.Outlined,
150+
sizeType = FilledButtonSize.XL,
154151
)
155152

156-
BoxButton(
153+
FilledButton(
157154
onClick = {},
158155
text = "L Button",
159-
buttonType = BoxButtonType.Tertiary,
160-
sizeType = BoxButtonSize.L,
156+
buttonType = FilledButtonType.Outlined,
157+
sizeType = FilledButtonSize.L,
161158
)
162159

163-
BoxButton(
160+
FilledButton(
164161
onClick = {},
165162
text = "M Button",
166-
buttonType = BoxButtonType.Tertiary,
167-
sizeType = BoxButtonSize.M,
163+
buttonType = FilledButtonType.Outlined,
164+
sizeType = FilledButtonSize.M,
168165
)
169166

170-
BoxButton(
167+
FilledButton(
171168
onClick = {},
172169
text = "S Button",
173-
buttonType = BoxButtonType.Tertiary,
174-
sizeType = BoxButtonSize.S,
170+
buttonType = FilledButtonType.Outlined,
171+
sizeType = FilledButtonSize.S,
175172
)
176173

177-
BoxButton(
174+
FilledButton(
178175
onClick = {},
179176
text = "XS Button",
180-
buttonType = BoxButtonType.Tertiary,
181-
sizeType = BoxButtonSize.XS,
177+
buttonType = FilledButtonType.Outlined,
178+
sizeType = FilledButtonSize.XS,
182179
)
183180

184-
BoxButton(
181+
FilledButton(
185182
onClick = {},
186183
text = "XXS Button",
187-
buttonType = BoxButtonType.Tertiary,
188-
sizeType = BoxButtonSize.XXS,
184+
buttonType = FilledButtonType.Outlined,
185+
sizeType = FilledButtonSize.XXS,
189186
)
190187
}
191188
}
192189
Row(
193190
horizontalArrangement = Arrangement.spacedBy(8.dp),
194191
) {
195-
BoxButton(
192+
FilledButton(
196193
onClick = {},
197194
text = "M Button",
198-
sizeType = BoxButtonSize.S,
195+
sizeType = FilledButtonSize.S,
199196
leftIcon = HandyIcons.Line.Add,
200197
enabled = false,
201198
)
202199

203-
BoxButton(
200+
FilledButton(
204201
onClick = {},
205202
text = "M Button",
206-
sizeType = BoxButtonSize.S,
203+
sizeType = FilledButtonSize.S,
207204
rightIcon = HandyIcons.Line.Add,
208205
enabled = false,
209206
)
210-
BoxButton(
207+
FilledButton(
211208
onClick = {},
212209
text = "M Button",
213-
sizeType = BoxButtonSize.S,
210+
sizeType = FilledButtonSize.S,
214211
leftIcon = HandyIcons.Line.Add,
215212
rightIcon = HandyIcons.Line.Add,
216213
enabled = false,
@@ -219,88 +216,88 @@ private fun BoxButtonPreview() {
219216
Row(
220217
horizontalArrangement = Arrangement.spacedBy(8.dp),
221218
) {
222-
BoxButton(
219+
FilledButton(
223220
onClick = {},
224221
text = "M Button",
225-
sizeType = BoxButtonSize.S,
222+
sizeType = FilledButtonSize.S,
226223
leftIcon = HandyIcons.Line.Add,
227224
)
228225

229-
BoxButton(
226+
FilledButton(
230227
onClick = {},
231228
text = "M Button",
232-
sizeType = BoxButtonSize.S,
229+
sizeType = FilledButtonSize.S,
233230
rightIcon = HandyIcons.Line.Add,
234231
)
235-
BoxButton(
232+
FilledButton(
236233
onClick = {},
237234
text = "M Button",
238-
sizeType = BoxButtonSize.S,
235+
sizeType = FilledButtonSize.S,
239236
leftIcon = HandyIcons.Line.Add,
240237
rightIcon = HandyIcons.Line.Add,
241238
)
242239
}
243240
Row(
244241
horizontalArrangement = Arrangement.spacedBy(8.dp),
245242
) {
246-
BoxButton(
243+
FilledButton(
247244
onClick = {},
248245
text = "M Button",
249-
sizeType = BoxButtonSize.S,
250-
buttonType = BoxButtonType.Secondary,
246+
sizeType = FilledButtonSize.S,
247+
buttonType = FilledButtonType.Secondary,
251248
leftIcon = HandyIcons.Line.Add,
252249
)
253250

254-
BoxButton(
251+
FilledButton(
255252
onClick = {},
256253
text = "M Button",
257-
sizeType = BoxButtonSize.S,
258-
buttonType = BoxButtonType.Secondary,
254+
sizeType = FilledButtonSize.S,
255+
buttonType = FilledButtonType.Secondary,
259256
rightIcon = HandyIcons.Line.Add,
260257
)
261-
BoxButton(
258+
FilledButton(
262259
onClick = {},
263260
text = "M Button",
264-
sizeType = BoxButtonSize.S,
265-
buttonType = BoxButtonType.Secondary,
261+
sizeType = FilledButtonSize.S,
262+
buttonType = FilledButtonType.Secondary,
266263
leftIcon = HandyIcons.Line.Add,
267264
rightIcon = HandyIcons.Line.Add,
268265
)
269266
}
270267
Row(
271268
horizontalArrangement = Arrangement.spacedBy(8.dp),
272269
){
273-
BoxButton(
270+
FilledButton(
274271
onClick = {},
275272
text = "M Button",
276-
sizeType = BoxButtonSize.S,
277-
buttonType = BoxButtonType.Tertiary,
273+
sizeType = FilledButtonSize.S,
274+
buttonType = FilledButtonType.Outlined,
278275
leftIcon = HandyIcons.Line.Add,
279276
)
280277

281-
BoxButton(
278+
FilledButton(
282279
onClick = {},
283280
text = "M Button",
284-
sizeType = BoxButtonSize.S,
285-
buttonType = BoxButtonType.Tertiary,
281+
sizeType = FilledButtonSize.S,
282+
buttonType = FilledButtonType.Outlined,
286283
rightIcon = HandyIcons.Line.Add,
287284
)
288-
BoxButton(
285+
FilledButton(
289286
onClick = {},
290287
text = "M Button",
291-
sizeType = BoxButtonSize.S,
292-
buttonType = BoxButtonType.Tertiary,
288+
sizeType = FilledButtonSize.S,
289+
buttonType = FilledButtonType.Outlined,
293290
leftIcon = HandyIcons.Line.Add,
294291
rightIcon = HandyIcons.Line.Add,
295292
)
296293
}
297294
Row(
298295
horizontalArrangement = Arrangement.spacedBy(8.dp),
299296
) {
300-
BoxButton(
297+
FilledButton(
301298
onClick = {},
302299
text = "M Button",
303-
sizeType = BoxButtonSize.M,
300+
sizeType = FilledButtonSize.M,
304301
leftIcon = HandyIcons.Line.Add,
305302
horizontalPadding = 100.dp
306303
)

0 commit comments

Comments
 (0)