Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

Make more MUI classes available for Buttons #588

Open AAstridVH opened 9 months ago

AAstridVH commented 9 months ago

Make the MUI classes "Small", "Medium" and "Large" available for buttons.

https://mui.com/material-ui/react-button/

image

FlorianJacta commented 9 months ago

This issue comes from a user on Discord. It is quite hard to change the size of a button if you don't know CSS.

main.py:

from taipy import Gui 

buttons = """
<|Small|button|class_name=smallButton|>
<|Big|button|class_name=bigButton|>"
"""

Gui(buttons).run()

main.css:

.smallButton{
    min-height: unset;
    line-height: 1.2rem;
    padding: 0;
    font-size: 1rem;
    text-transform: initial;
}

.bigButton{
    min-height: unset;
    line-height: 3.6rem;
    padding: 0;
    font-size: 3rem;
    text-transform: initial;
}

image

Environment

Taipy 3.0.0