style: use user given capitalisation

This commit is contained in:
Carlos Valente
2024-04-25 13:41:59 +02:00
committed by Carlos Valente
parent 817ebcdd26
commit d8a8f0ad92
2 changed files with 7 additions and 7 deletions
@@ -45,7 +45,6 @@
font-size: calc(1rem - 3px);
color: $label-gray;
margin-bottom: 0.25rem;
text-transform: capitalize;
}
.decorated {
@@ -108,17 +108,18 @@ export default function EventEditor() {
Manage
</Button>
</div>
{Object.keys(customFields).map((label) => {
const key = `${event.id}-${label}`;
const fieldName = `custom-${label}`;
const initialValue = event.custom[label] ?? '';
const { backgroundColor, color } = getAccessibleColour(customFields[label].colour);
{Object.keys(customFields).map((fieldKey) => {
const key = `${event.id}-${fieldKey}`;
const fieldName = `custom-${fieldKey}`;
const initialValue = event.custom[fieldKey] ?? '';
const { backgroundColor, color } = getAccessibleColour(customFields[fieldKey].colour);
const labelText = customFields[fieldKey].label;
return (
<EventTextArea
key={key}
field={fieldName}
label={label}
label={labelText}
initialValue={initialValue}
submitHandler={handleSubmit}
className={style.decorated}