/** * @upsetjs/react * https://github.com/upsetjs/upsetjs * * Copyright (c) 2021 Samuel Gratzl */ import type { ISetLike } from '@upsetjs/model'; import React, { PropsWithChildren } from 'react'; import type { UpSetDataInfo } from '../derive/deriveDataDependent'; import type { UpSetSizeInfo } from '../derive/deriveSizeDependent'; import type { UpSetStyleInfo } from '../derive/deriveStyleDependent'; export default function LabelsSelection({ data, size, style, selection, }: PropsWithChildren<{ data: UpSetDataInfo; size: UpSetSizeInfo; style: UpSetStyleInfo; selection: ISetLike | null; }>) { if (!selection || selection.type !== 'set' || !data.sets.keys.includes(data.toKey(selection))) { return null; } const d = selection; return ( ); }