Skip to content

[Question] Align the content of a text button #1885

Answered by ndonkoHenri
AngelCard asked this question in Q&A
Discussion options

You must be logged in to vote

To left-align the content of the TextButton, you could make use of the content prop as below:

TextButton(
    expand=True,
    # text=text,
    # icon=icon,
    content=Row(
        alignment=MainAxisAlignment.START,
        controls=[
            Icon(icon),
            Text(text)
        ]
    ),
    on_click=on_click,
    icon_color='#17F1FF',
    style=ButtonStyle(
        shape={
            '': RoundedRectangleBorder(radius=0)
        }
    )
),

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AngelCard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants