Learn more from guides & API docs
Catch up with the latest on the blog
Try our many live demos
View webinars
Find answers or ask questions
Docs & demos for Angular
Docs & demos for React
Docs & demos for Vue
Our state of the art Gantt chart
Post by mv2022 » Thu May 12, 2022 5:14 pm
How would I change the button color? For example, if I add a custom class b-test in the cls, would the class style be added in the gantt.stockholm.css file?
<bryntum-button text = 'Save' cls = 'b-test' (onAction)="save()" ></bryntum-button>
Post by mats » Thu May 12, 2022 9:24 pm
You can set
cls = 'b-green'
or other basic colors red/blue etc.
Post by mv2022 » Thu May 12, 2022 9:34 pm
what if I want to add a custom color to the button, the background-color to be #00897b ? Thanks
Post by mats » Fri May 13, 2022 12:48 pm
Then you can either set a cls and include that color in your stylesheet, or use https://bryntum.com/docs/scheduler/api/Core/widget/Button#config-style
cls
Post by mv2022 » Fri May 13, 2022 5:20 pm
Sorry, I can't seem to get this to work.
If you can provide a small example of how this would be used in the inline-project demo if I wanted to add a custom class to the button.
I tried doing the following and didn't work in the inline-data demo project.
<bryntum-button text = 'Change data' cls="test" style="background-color: red;" (onAction) = "onChangeData()" ></bryntum-button>
app.component.scss
.test{ background-color: red; color: blue; }
Post by mats » Fri May 13, 2022 8:15 pm
You will need to use a bit more specificity, as the default styling is using:
.b-button:not(.b-tab)