import React from 'react' import { observer } from 'mobx-react' import RectBg from './RectBg' import Tree from './Tree' import type { LinearMafDisplayModel } from '../../stateModel' const ColorLegend = observer(function ({ model, }: { model: LinearMafDisplayModel }) { const { labelWidth, canDisplayLabel, totalHeight, treeWidth, sidebarWidth, samples = [], rowHeight, svgFontSize, } = model const boxHeight = Math.min(20, rowHeight) return ( <> {samples.map((sample, idx) => ( ))} {canDisplayLabel ? samples.map((sample, idx) => ( {sample.label} )) : null} ) }) export default ColorLegend