Skip to content

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

Open
@andrej-jasso

Description

@andrej-jasso
          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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions