feat: Adds text labeled content and style.
This commit is contained in:
@@ -49,11 +49,7 @@ public struct DefaultInfoButtonStyle<Style: LabelStyle>: PrimitiveButtonStyle {
|
||||
.foregroundStyle(color)
|
||||
.labelStyle(labelStyle)
|
||||
}
|
||||
// configuration.label
|
||||
// .font(font)
|
||||
// .foregroundStyle(color.opacity(configuration.isPressed ? 0.5 : 1))
|
||||
// .labelStyle(labelStyle)
|
||||
// .scaleEffect(configuration.isPressed ? 0.8 : 1)
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
17
Sources/Styleguide/Styles/TextLabeledContentStyle.swift
Normal file
17
Sources/Styleguide/Styles/TextLabeledContentStyle.swift
Normal file
@@ -0,0 +1,17 @@
|
||||
import SwiftUI
|
||||
|
||||
public struct GridRowTextLabeledContentStyle: LabeledContentStyle {
|
||||
|
||||
public func makeBody(configuration: Configuration) -> some View {
|
||||
GridRow {
|
||||
configuration.label
|
||||
configuration.content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension LabeledContentStyle where Self == GridRowTextLabeledContentStyle {
|
||||
public static var gridRow: Self {
|
||||
GridRowTextLabeledContentStyle()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user