Move "ValueRotationButton" props to component

This commit is contained in:
schroda
2026-06-02 13:27:04 +02:00
parent 1228b5ac2a
commit d7908a2af0
2 changed files with 22 additions and 22 deletions

View File

@@ -27,27 +27,6 @@ interface DisplayData {
export type ValueToDisplayData<Value extends string | number> = Record<Value, DisplayData>;
export interface ValueRotationButtonBaseProps<Value extends string | number> {
tooltip?: string;
value: Value;
defaultValue?: Value;
values: Value[];
setValue: (value: Value) => void;
valueToDisplayData: ValueToDisplayData<Value>;
}
export interface ValueRotationButtonDefaultableProps<Value extends string | number> extends OptionalProperty<
ValueRotationButtonBaseProps<Value>,
'value'
> {
isDefaultable?: boolean;
onDefault?: () => void;
}
export type ValueRotationButtonProps<Value extends string | number> =
| (ValueRotationButtonBaseProps<Value> & PropertiesNever<ValueRotationButtonDefaultableProps<Value>>)
| ValueRotationButtonDefaultableProps<Value>;
export enum ScrollOffset {
BACKWARD,
FORWARD,