skilld-labs / ui-patterns-kaizen

Development for https://www.drupal.org/project/ui_suite
3 stars 0 forks source link

Common assets. Images. Icons. Breakpoints. #21

Open iberdinsky-skilld opened 1 year ago

iberdinsky-skilld commented 1 year ago

https://github.com/skilld-labs/ui-patterns-kaizen/issues/20

If component can be fully independent, then what to do with such simple situation?

  1. You have component menu, where any menu link can have any svg icon from design system.
  2. You have button component, where button can have any svg icon from design system.

Where to store icons? In both components? If your answer is "no, icons can be centralized in one place" -> that means your components already can not be fully independent. So when you will copy your component and put it in new theme on another project - you also have to take care about:

  1. Assets affected by component (if it all exist on the new theme)
  2. Third party libraries (if it's exist on new theme)
  3. css variables
  4. media breakpoints
  5. build process (if your component will be broken on build or not, on new project).