Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

FormattedValueControl

Formatted Value Control using the host's formatted numeric editing presentation.

Import

import { FormattedValueControl } from "@dartwic/interface-sdk/ui";

Declaration

export const FormattedValueControl: HostComponent<FormattedValueControlProps>;

FormattedValueControlProps

Click-to-edit numeric value with a host popover.

export interface FormattedValueControlProps extends HostComponentProps {
    value: number;
    units?: string;
    label?: string;
    submitLabel?: string;
    disabled?: boolean;
    onCommit: (value: number) => unknown;
    variant?: "default" | "outline" | "ghost" | "link" | "secondary" | "destructive";
}
PropTypeRequirementDescription
valuenumberRequired
unitsstringOptional
labelstringOptional
submitLabelstringOptional
disabledbooleanOptional
onCommit(value: number) => unknownRequired
variant"default" | "outline" | "ghost" | "link" | "secondary" | "destructive"Optional
classNamestringOptionalAdditional Tailwind or host CSS classes.
childrenHostNodeOptionalChild content rendered by the host component.
idstringOptionalOptional DOM identifier.
styleRecord<string, unknown>OptionalInline style values passed to the host component.