import { Component, ReactNode } from "react"; import { AttrInput } from "@Component/AttrInput/AttrInput"; import { useStatusWithEvent, IMixinStatusProps } from "@Context/Status"; import { AllI18nKeys } from "@Component/Localization/Localization"; import { ErrorMessage } from "@Component/ErrorMessage/ErrorMessage"; import { ColorInput } from "@Component/ColorInput/ColorInput"; import "./LabelDetails.scss"; import { LabelList } from "@Component/LabelList/LabelList"; import { Label } from "@Model/Label"; @useStatusWithEvent("focusLabelChange") class LabelDetails extends Component { public readonly AttrI18nKey: AllI18nKeys[] = [ "Common.Attr.Key.Display.Name", "Common.Attr.Key.Color", ] private renderFrom(label: Label) { return <> { if (this.props.status) { this.props.status.model.deleteLabel(label); this.props.status.setLabelObject(); } }} /> { if (this.props.status) { } }}/> ; } public render(): ReactNode { if (this.props.status) { if (this.props.status.focusLabel) { return this.renderFrom(this.props.status.focusLabel); } } return ; } } export { LabelDetails };