gamcoh / st-card

Streamlit component for UI cards
https://pypi.org/project/streamlit-card/
MIT License
116 stars 19 forks source link

Change `margin` to `padding` in the card parent div styling #38

Open p1utoze opened 2 months ago

p1utoze commented 2 months ago

Hello there! It's an amazing extension for streamlit that you have created. I encountered a small issue where I wanted to change the padding in parent division's styling. Initially, I didn't get any changes by passing padding as key to the styles dict. Later when I referred the Parent division in stCard.tsx. The padding was being set from margin variable. https://github.com/gamcoh/st-card/blob/ec2a4ee537476884575509d82a67b32b4c776f37/streamlit_card/frontend/src/stCard.tsx#L75-L76

This leads to confusion. Is there a reason why it is set like this? It would be better to create a new variable for padding too.

gamcoh commented 1 day ago

Hi, You're right I don't know why I've done that, feel free to open a PR.