diff --git a/src/base/Base.types.ts b/src/base/Base.types.ts index 16a40a72..a65e5726 100644 --- a/src/base/Base.types.ts +++ b/src/base/Base.types.ts @@ -27,27 +27,6 @@ interface DisplayData { export type ValueToDisplayData = Record; -export interface ValueRotationButtonBaseProps { - tooltip?: string; - value: Value; - defaultValue?: Value; - values: Value[]; - setValue: (value: Value) => void; - valueToDisplayData: ValueToDisplayData; -} - -export interface ValueRotationButtonDefaultableProps extends OptionalProperty< - ValueRotationButtonBaseProps, - 'value' -> { - isDefaultable?: boolean; - onDefault?: () => void; -} - -export type ValueRotationButtonProps = - | (ValueRotationButtonBaseProps & PropertiesNever>) - | ValueRotationButtonDefaultableProps; - export enum ScrollOffset { BACKWARD, FORWARD, diff --git a/src/base/components/buttons/ValueRotationButton.tsx b/src/base/components/buttons/ValueRotationButton.tsx index e5a1fae1..591bd515 100644 --- a/src/base/components/buttons/ValueRotationButton.tsx +++ b/src/base/components/buttons/ValueRotationButton.tsx @@ -11,9 +11,30 @@ import { useMemo } from 'react'; import Button from '@mui/material/Button'; import { useLingui } from '@lingui/react/macro'; import { CustomTooltip } from '@/base/components/CustomTooltip.tsx'; -import type { ValueRotationButtonProps } from '@/base/Base.types.ts'; import { getNextRotationValue } from '@/base/utils/ValueRotationButton.utils.ts'; import { Superscript } from '@/base/components/texts/Superscript.tsx'; +import type { ValueToDisplayData } from '@/base/Base.types.ts'; + +export interface ValueRotationButtonBaseProps { + tooltip?: string; + value: Value; + defaultValue?: Value; + values: Value[]; + setValue: (value: Value) => void; + valueToDisplayData: ValueToDisplayData; +} + +export interface ValueRotationButtonDefaultableProps extends OptionalProperty< + ValueRotationButtonBaseProps, + 'value' +> { + isDefaultable?: boolean; + onDefault?: () => void; +} + +export type ValueRotationButtonProps = + | (ValueRotationButtonBaseProps & PropertiesNever>) + | ValueRotationButtonDefaultableProps; export const ValueRotationButton = ({ tooltip,