Closed stefano-lacorazza closed 2 months ago
Could you add a small example for each approach, please I think we have one more variant with class and id styling or maybe some of your approaches means that?
All example code can be found in frontend/src/bundles/style-comparison
.
Inline styling involves applying styles directly to the element in the return statement using the style
or sx
attributes.
Prop styling involves passing styles as props to the component, allowing dynamic and reusable styling. They can be passed as style
or sx
properties.
Chakra theme styling involves defining styles in a theme object to expand Chakra's default theme and applying them to components using the ChakraProvider
and theme
props.
CSS Modules styling involves creating a CSS file with the .module.css
extension and importing it into the component. This ensures that styles are scoped locally to the component.
I guess we can close this ticket because we already decided on styling approach and created a separate ticket for that https://github.com/BinaryStudioAcademy/bsa-2024-outreachvids/issues/164
First we must decide the styling approach: direct styling in component, prop styling or custom theme using chakra.