Although Geoffrey has a good point and a very maintainable solution, there is a way do it with one button:
- In the button’s General->Caption use a parameter. See this example:
- In the button’s property ‘Dynamic classes’ add something like
if ($MyEntity/myattribute = Enum_MyEnum.Valuethis) then 'brand-success' else 'brand-warning'
This will pick up the brand’s default colors. You can also create your own classes and add them to your scss-files.
what i suggest is the following to make it simple for you:
This way you have an easy and quick solution to your problem where you can have different colors (can be standard, or you can make custom classes) and you will have different captions.