Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opacity scaleEffect and animation into ButtonStateStyle #38

Open
dasdranagon opened this issue Aug 6, 2024 · 0 comments
Open

Add opacity scaleEffect and animation into ButtonStateStyle #38

dasdranagon opened this issue Aug 6, 2024 · 0 comments
Assignees

Comments

@dasdranagon
Copy link
Contributor

Swift UI allows to add opacity and animation effects into the button style:

struct DemoButtonStyle: SwiftUI.ButtonStyle {
    func makeBody(configuration: SwiftUI.ButtonStyle.Configuration) -> some View {
        configuration.label
            .opacity(configuration.isPressed ? 0.5 : 1)
            .scaleEffect(configuration.isPressed ? 0.5 : 1)
            .animation(.easeOut(duration: 0.2), value: configuration.isPressed)
    }
}

However this possibility seems to be missing in Kaluga SwiftUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants