Skip to content

Commit 49bb022

Browse files
committed
[#250] 코드 리뷰 반영
1 parent c7ca22f commit 49bb022

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: YDS-Storybook/SwiftUI/Atom/LabelPageView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import YDS_SwiftUI
1313

1414
@State var text: String? = "Label"
1515
@State var typoStyleSelectedIndex = 0
16-
@State var lineLimit: Int? = nil
16+
@State var lineLimit: Int?
1717
@State var textColorSelectedIndex: Int = 0
1818
@State var alignmentSelectedIndex: Int = 1
1919
@State var truncationModeSelectedIndex: Int = 2
@@ -38,7 +38,7 @@ import YDS_SwiftUI
3838
VStack {
3939
YDSLabel(
4040
text: text,
41-
style: selectedTypoStyle,
41+
font: selectedTypoStyle,
4242
lineLimit: lineLimit,
4343
textColor: selectedColor,
4444
alignment: selectedAlignment,

Diff for: YDS-SwiftUI/Source/Atom/YDSLabel.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ extension Text.TruncationMode {
1414

1515
public struct YDSLabel: View {
1616
let text: String?
17-
let style: Font
17+
let font: Font
1818
let lineLimit: Int?
1919
let textColor: Color
2020
let alignment: TextAlignment
2121
let truncationMode: Text.TruncationMode
2222
let allowsTightening: Bool
2323

2424
public init(text: String? = "Label",
25-
style: Font = YDSFont.display1,
25+
font: Font = YDSFont.display1,
2626
lineLimit: Int? = nil,
2727
textColor: Color = YDSColor.textPrimary,
2828
alignment: TextAlignment = .center,
2929
truncationMode: Text.TruncationMode = .tail,
3030
allowsTightening: Bool = false
3131
) {
3232
self.text = text
33-
self.style = style
33+
self.font = font
3434
self.lineLimit = lineLimit
3535
self.textColor = textColor
3636
self.alignment = alignment
@@ -41,7 +41,7 @@ public struct YDSLabel: View {
4141
public var body: some View {
4242
if let text = text {
4343
Text(text)
44-
.font(style)
44+
.font(font)
4545
.lineLimit(lineLimit)
4646
.foregroundColor(textColor)
4747
.multilineTextAlignment(alignment)

0 commit comments

Comments
 (0)