Skip to content

Commit 2d7a28f

Browse files
committed
feat: Add secondaryBrand style to buttons
1 parent b178999 commit 2d7a28f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Sources/Mistica/Components/Button/ButtonStyle+Toolkit.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,26 @@ public extension Button.Style {
5252
)
5353
}
5454

55+
static var secondaryBrand: Button.Style {
56+
return Button.Style(
57+
allowsBleedingAlignment: false,
58+
stateStyleByState: [
59+
.normal: Button.StateStyle(textColor: .textButtonSecondaryInverse,
60+
backgroundColor: .buttonSecondaryBackgroundBrand,
61+
borderColor: .buttonSecondaryBorderInverse),
62+
.selected: Button.StateStyle(textColor: .textButtonSecondaryInversePressed,
63+
backgroundColor: .buttonSecondaryBackgroundBrandPressed,
64+
borderColor: .buttonSecondaryBorderInversePressed),
65+
.disabled: Button.StateStyle(textColor: .textButtonSecondaryInverse.withAlphaComponent(0.5),
66+
backgroundColor: .buttonSecondaryBackgroundBrand.withAlphaComponent(0.5),
67+
borderColor: .buttonSecondaryBorderInverse.withAlphaComponent(0.5)),
68+
.loading: Button.StateStyle(textColor: .textButtonSecondaryInverse,
69+
backgroundColor: .buttonSecondaryBackgroundBrand,
70+
borderColor: .buttonSecondaryBorderInverse)
71+
]
72+
)
73+
}
74+
5575
static var danger: Button.Style {
5676
let textColor: UIColor = .textButtonPrimary
5777

0 commit comments

Comments
 (0)