Display active profile for default value

In case the profile was not set and the default value got used, there was no indication of the active profile.
This commit is contained in:
schroda
2024-12-12 02:09:19 +01:00
parent 7307a3350d
commit 858c3b4bcf
7 changed files with 39 additions and 10 deletions

View File

@@ -33,6 +33,7 @@ export type ValueToDisplayData<Value extends string | number> = Record<Value, Di
export interface MultiValueButtonBaseProps<Value extends string | number> {
tooltip?: string;
defaultText?: string;
value: Value;
values: Value[];
setValue: (value: Value) => void;

View File

@@ -15,6 +15,7 @@ import { getNextRotationValue } from '@/modules/core/utils/ValueRotationButton.u
export const ValueRotationButton = <Value extends string | number>({
tooltip,
defaultText,
value,
values,
setValue,
@@ -44,7 +45,7 @@ export const ValueRotationButton = <Value extends string | number>({
startIcon={defaultIcon}
size="large"
>
{t('global.label.default')}
{defaultText ?? t('global.label.default')}
</Button>
) : (
<Button