Brickslab.Toolsv2.1.1

@brickslab./ui-webAnalytics

Slide-in side panel for chart drilldown details with overlay and keyboard close.

Panel demo

Props

PropTypeDéfautRequisDescription
openbooleanControls panel visibility.
onOpenChange(v: boolean) => voidCalled to close the panel (overlay click or Escape).
titlestringPanel header title.
contextunknownArbitrary context passed from the triggering chart (not rendered directly).
childrenReactNodePanel body content.
Override rapide

Tous les paramètres listés dans cette table sont overrideables via les props. Utilisez ce squelette comme point de départ.

<MyComponent
  open={true}
  onOpenChange={true}
  title="..."
  context={...}
  children={<span>...</span>}
/>
openonOpenChangetitlecontextchildren

Usage

tsx
import { DrilldownPanel } from "@brickslab./ui-web";

const [open, setOpen] = useState(false);

<button onClick={() => setOpen(true)}>View details</button>

<DrilldownPanel
  open={open}
  onOpenChange={setOpen}
  title="Segment breakdown"
>
  <DistributionChart data={segmentData} />
</DrilldownPanel>