Skip to content

Commit

Permalink
Use title instead
Browse files Browse the repository at this point in the history
  • Loading branch information
FadhlanR committed Apr 6, 2024
1 parent 785b8bd commit fae4d7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/base/field-component.gts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export function getBoxComponent(
};
}

function title(format: Format) {
return format === 'atom' && isCard(model.value) ? model.value.title : '';
}

let component: TemplateOnlyComponent<{
Args: { format?: Format; displayContainer?: boolean };
}> = <template>
Expand All @@ -112,6 +116,7 @@ export function getBoxComponent(
fieldType=field.fieldType
fieldName=field.name
}}
title={{title f.format}}
data-test-card-format={{f.format}}
data-test-field-component-card
{{! @glint-ignore Argument of type 'unknown' is not assignable to parameter of type 'Element'}}
Expand Down

0 comments on commit fae4d7d

Please sign in to comment.