Revize 67683ef3
Přidáno uživatelem Dominik Poch před asi 2 roky(ů)
webapp/components/modals/SubTagModal.tsx | ||
---|---|---|
5 | 5 |
* All values that the modal window can show. |
6 | 6 |
*/ |
7 | 7 |
export interface SubTagModalValues { |
8 |
name: string; |
|
9 |
description: string; |
|
8 |
name?: string;
|
|
9 |
description?: string;
|
|
10 | 10 |
} |
11 | 11 |
|
12 | 12 |
/** |
... | ... | |
24 | 24 |
/** |
25 | 25 |
* Initialize default values if they were not set in props. |
26 | 26 |
*/ |
27 |
const values = props.defaultValues ?? { |
|
28 |
name: '', |
|
29 |
description: '', |
|
30 |
}; |
|
27 |
let values: SubTagModalValues; |
|
28 |
|
|
29 |
if (props.defaultValues) { |
|
30 |
values = { |
|
31 |
name: props.defaultValues.name ?? '', |
|
32 |
description: props.defaultValues.description ?? '', |
|
33 |
}; |
|
34 |
} else { |
|
35 |
values = { |
|
36 |
name: '', |
|
37 |
description: '', |
|
38 |
}; |
|
39 |
} |
|
31 | 40 |
|
32 | 41 |
/** |
33 | 42 |
* The form. |
Také k dispozici: Unified diff
Changed default tag color
Default color in tag modal changed to color of a category