lidofinance / ui

React UI Components for Lido projects.
MIT License
20 stars 16 forks source link

Moved Accordion to css modules #398

Closed hexnickk4997 closed 1 year ago

hexnickk4997 commented 1 year ago

Description

Moved one component to CSS Modules so we can take a look how migration is going and if everyone likes it.

Demo

CSS Modules desktop

Screenshot 2023-07-14 at 14 28 20

CSS Modules mobile

Screenshot 2023-07-14 at 14 28 49

CSS Modules dark

image

Styled Components desktop

Screenshot 2023-07-14 at 14 29 04

Styled Components mobile

Screenshot 2023-07-14 at 14 29 12

Review notes

Moved to SASS instead of CSS, because it looks like it's not possible to reuse media queries with CSS & CSS variables. Trying to use as less SASS syntax as possible, right now it's only used for breakpoints & media queries.

Breakpoints were implemented similarly as https://getbootstrap.com/docs/5.0/layout/breakpoints/

default exports → named exports.

Storybook must import from '.' so we can make sure, that we are actually exposing from the package everything we show on demo stand.