romanonatacha / dash_trich_components

trich.ai open source components library for Dash Plotly. Contribute!
https://romanonatacha.github.io/dash_trich_components/
MIT License
53 stars 6 forks source link

Card Background Color #18

Open firmai opened 3 years ago

firmai commented 3 years ago

Hi, thanks for the package, I got in touch with Leonardo over Linkedin to congragulate him/you about the pacakge, and to ask a few questions. Instead of getting personal advice, its probably better to ask my question/s on here.

For one, I was wondering if there is a way to adjust the bakground color of the Card component. https://github.com/romanonatacha/dash_trich_components/blob/master/dash_trich_components/Card.py

I have attempted background-color but it extended over the padding, and the default light mode color remained. This type of customisation would be grand (unless its already there and I am missing it). Thanks again for the package.

romanonatacha commented 3 years ago

Hey @firmai, I am not sure if I understood the issue, but to change the background-color of the Card component you need to do it with css. Create a className for the card component

and on css you write something like this

.my_className .card {
    background-color: blue;
}

PS: replace with variables if you are using the Theme Toggle component

I don't know if you already tried this, if it doesn't work please provide screenshots and code snippets so I can help you better.