vtex / shoreline

Design System for the VTEX Admin that replaces "Admin UI" and "Styleguide"
https://shoreline.vtex.com
15 stars 0 forks source link

Replace Slot by contextual components #1588

Closed matheusps closed 2 months ago

matheusps commented 2 months ago

Problem

The Slot concept is hard to understand, work with, and document.

  1. Inconsistent: Can be used with or without name.
<ModalHeader>
  <Slot>{/* ... */}</Slot>
</ModalHeader>
<Page>
  <PageHeader>
    <Slot name="top">{/* ... */}</Slot>
    <Slot name="bottom">{*/ ... */}</Slot>
  </PageHeader>
</Page>
  1. Weak typing: If we type name as "top" | "bottom" | etc it will not be clear where to use them

Solution

The impacted components are:

Usage examples

No response

Dependencies

No response

References

No response

matheusps commented 2 months ago

Implementation on PageHeader : #1587