UNPKG

@while-and-for/tremor-react

Version:

The React library to build dashboards faster.

2 lines (1 loc) 471 B
import e,{useRef as t}from"react";import r from"../../../hooks/useOnWindowResize.js";import o from"../../text-elements/Legend/Legend.js";const a=({payload:a},n,l)=>{const s=t(null);return r((()=>{var e;var t;l((t=null===(e=s.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)})),e.createElement("div",{ref:s,className:"flex items-center justify-end"},e.createElement(o,{categories:a.map((e=>e.value)),colors:a.map((e=>n.get(e.value)))}))};export{a as default};