import * as React from 'react'; import { Input, SegmentedControl, Text, Tooltip } from '@mantine/core'; import { EViolinOverlay, EYAxisMode } from './interfaces'; interface SegmentedControlProps { callback: (s: T) => void; currentSelected: T; disabled?: boolean; } const violinOverlayOptions = [ { label: EViolinOverlay.NONE, value: EViolinOverlay.NONE }, { label: EViolinOverlay.BOX, value: EViolinOverlay.BOX }, { label: EViolinOverlay.STRIP, value: EViolinOverlay.STRIP }, ]; const boxplotOverlayOptions = [ { label: EViolinOverlay.NONE, value: EViolinOverlay.NONE }, { label: EViolinOverlay.STRIP, value: EViolinOverlay.STRIP }, ]; export function ViolinOverlaySegmentedControl({ callback, currentSelected, disabled, isViolin, }: SegmentedControlProps & { isViolin: boolean }) { return ( Overlay } > ); } export function ViolinSyncYAxisSegmentedControl({ callback, currentSelected, disabled, disableMerged, }: SegmentedControlProps & { disableMerged?: boolean }) { // If the merged option is disabled and the current selected is merged, change it to unsynced if (disableMerged && currentSelected === EYAxisMode.MERGED) { callback(EYAxisMode.UNSYNC); } return ( Y-Axis } > ); }