Skip to content

Button style that take the max screen width. Icon moves the button label on loading. #16

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

Open
andrej-jasso opened this issue Jan 16, 2025 · 1 comment
Assignees

Comments

@andrej-jasso
Copy link
Contributor

          I found a problem, please try to use the button style that take the max screen width. Icon moves the button label on loading.
Untitled.mp4

Implemented code

            Button(action: { submit() }) {
                Text(L.submit)
                    .multilineTextAlignment(.center)
                    .frame(maxWidth: .infinity)
            }
            .buttonStyle(
                GRButtonStyle(
                    appearance: .sourcery,
                    isLoading: isLoading,
                    size: .custom(
                        .init(
                            height: 50,
                            iconSize: .init(
                                width: 32,
                                height: 32
                            ),
                            edgeSpacing: .init(top: 4, leading: 16, bottom: 4, trailing: 16),
                            itemSpacing: 16,
                            cornerRadius: 16
                        )
                    )
                )
            )

Originally posted by @vaIerika in #11 (review)

@andrej-jasso andrej-jasso changed the title I found a problem, please try to use the button style that take the max screen width. Icon moves the button label on loading. Button style that take the max screen width. Icon moves the button label on loading. Jan 16, 2025
@andrej-jasso
Copy link
Contributor Author

Related threads:
#11 (comment)
#11 (comment)

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