Skip to content

Commit

Permalink
refactoring code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffibm committed Nov 21, 2023
1 parent 3a33395 commit e16588b
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ import MiqStructuredListConditionalTag from '../value-tags/miq-structured-list-c

/** Usage eg: Automation / Embeded Automate / Generic Objects / item
* Properties has no links & Relationships have links */
const MiqStructuredListObject = ({ row, clickEvents, onClick }) => (
<StructuredListCell
className={classNames((row.label || row.value.input) ? 'content_value' : 'label_header', 'object_item')}
title={row && row.title !== undefined ? row.title : ''}
>
<MiqStructuredListConditionalTag row={row} onClick={onClick} clickEvents={clickEvents} />
</StructuredListCell>
);
const MiqStructuredListObject = ({ row, clickEvents, onClick }) => {
const isContent = row.label || (row.value && row.value.input);
return ((
<StructuredListCell
className={classNames(isContent ? 'content_value' : 'label_header', 'object_item')}
title={row && row.title !== undefined ? row.title : ''}
>
<MiqStructuredListConditionalTag row={row} onClick={onClick} clickEvents={clickEvents} />
</StructuredListCell>
));
};

export default MiqStructuredListObject;

Expand Down

0 comments on commit e16588b

Please sign in to comment.