diff --git a/YDS-Storybook/SwiftUI/Atom/LabelPageView.swift b/YDS-Storybook/SwiftUI/Atom/LabelPageView.swift index 3b8af965..dec80c82 100644 --- a/YDS-Storybook/SwiftUI/Atom/LabelPageView.swift +++ b/YDS-Storybook/SwiftUI/Atom/LabelPageView.swift @@ -13,7 +13,7 @@ import YDS_SwiftUI @State var text: String? = "Label" @State var typoStyleSelectedIndex = 0 - @State var lineLimit: Int? = nil + @State var lineLimit: Int? @State var textColorSelectedIndex: Int = 0 @State var alignmentSelectedIndex: Int = 1 @State var truncationModeSelectedIndex: Int = 2 @@ -38,7 +38,7 @@ import YDS_SwiftUI VStack { YDSLabel( text: text, - style: selectedTypoStyle, + font: selectedTypoStyle, lineLimit: lineLimit, textColor: selectedColor, alignment: selectedAlignment, diff --git a/YDS-SwiftUI/Source/Atom/YDSLabel.swift b/YDS-SwiftUI/Source/Atom/YDSLabel.swift index 60bdcb39..f37f2d61 100644 --- a/YDS-SwiftUI/Source/Atom/YDSLabel.swift +++ b/YDS-SwiftUI/Source/Atom/YDSLabel.swift @@ -14,7 +14,7 @@ extension Text.TruncationMode { public struct YDSLabel: View { let text: String? - let style: Font + let font: Font let lineLimit: Int? let textColor: Color let alignment: TextAlignment @@ -22,7 +22,7 @@ public struct YDSLabel: View { let allowsTightening: Bool public init(text: String? = "Label", - style: Font = YDSFont.display1, + font: Font = YDSFont.display1, lineLimit: Int? = nil, textColor: Color = YDSColor.textPrimary, alignment: TextAlignment = .center, @@ -30,7 +30,7 @@ public struct YDSLabel: View { allowsTightening: Bool = false ) { self.text = text - self.style = style + self.font = font self.lineLimit = lineLimit self.textColor = textColor self.alignment = alignment @@ -41,7 +41,7 @@ public struct YDSLabel: View { public var body: some View { if let text = text { Text(text) - .font(style) + .font(font) .lineLimit(lineLimit) .foregroundColor(textColor) .multilineTextAlignment(alignment)