import * as React from "react"; import BaseControl, { ControlData, ControlProps } from "./BaseControl"; import { TooltipComponent } from "design-system"; import { boxShadowOptions } from "constants/ThemeConstants"; import CloseLineIcon from "remixicon-react/CloseLineIcon"; import { ButtonTabComponent } from "components/ads"; export interface BoxShadowOptionsControlProps extends ControlProps { propertyValue: string | undefined; } const options = Object.keys(boxShadowOptions).map((optionKey) => ({ icon: (
{optionKey}
} key={optionKey} openOnTargetFocus={false} >
), value: boxShadowOptions[optionKey], })); const optionsValues = new Set(Object.values(boxShadowOptions)); class BoxShadowOptionsControl extends BaseControl< BoxShadowOptionsControlProps > { static getControlType() { return "BOX_SHADOW_OPTIONS"; } public render() { return ( { this.updateProperty(this.props.propertyName, value); }} values={this.props.evaluatedValue ? [this.props.evaluatedValue] : []} /> ); } static canDisplayValueInUI(config: ControlData, value: any): boolean { return optionsValues.has(value); } } export default BoxShadowOptionsControl;