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); font-size: calc(1rem - 3px);
color: $label-gray; color: $label-gray;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
text-transform: capitalize;
} }
.decorated { .decorated {
@@ -108,17 +108,18 @@ export default function EventEditor() {
Manage Manage
</Button> </Button>
</div> </div>
{Object.keys(customFields).map((label) => { {Object.keys(customFields).map((fieldKey) => {
const key = `${event.id}-${label}`; const key = `${event.id}-${fieldKey}`;
const fieldName = `custom-${label}`; const fieldName = `custom-${fieldKey}`;
const initialValue = event.custom[label] ?? ''; const initialValue = event.custom[fieldKey] ?? '';
const { backgroundColor, color } = getAccessibleColour(customFields[label].colour); const { backgroundColor, color } = getAccessibleColour(customFields[fieldKey].colour);
const labelText = customFields[fieldKey].label;
return ( return (
<EventTextArea <EventTextArea
key={key} key={key}
field={fieldName} field={fieldName}
label={label} label={labelText}
initialValue={initialValue} initialValue={initialValue}
submitHandler={handleSubmit} submitHandler={handleSubmit}
className={style.decorated} className={style.decorated}