mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 10:55:37 +00:00
Add linear gradient to AttributeRow relation
This commit is contained in:
parent
b633f93d10
commit
5edc2065dd
@ -66,8 +66,9 @@ class AttributeRow extends React.Component { // eslint-disable-line react/prefer
|
||||
const relationType = capitalize(this.props.row.params.type)
|
||||
|| <div><FormattedMessage id="modelPage.attribute.relationWith" /> <span style={{ fontStyle: 'italic' }}>{capitalize(this.props.row.params.target)}</span></div>;
|
||||
|
||||
const relationStyle = !this.props.row.params.type ? styles.relation : '';
|
||||
return (
|
||||
<li className={styles.attributeRow} onClick={this.edit}>
|
||||
<li className={`${styles.attributeRow} ${relationStyle}`} onClick={this.edit}>
|
||||
<div className={styles.flex}>
|
||||
<div className={styles.nameContainer}>
|
||||
{this.renderAttributesBox()}
|
||||
|
||||
@ -60,3 +60,7 @@
|
||||
margin-left: 1.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.relation {
|
||||
background: linear-gradient(135deg, rgba(28,93,231,0.05) 0%, rgba(239,243,253,0) 100%);
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ export class ModelPage extends React.Component { // eslint-disable-line react/pr
|
||||
const title = availableNumber > 1 ? 'modelPage.contentType.list.title.plural'
|
||||
: 'modelPage.contentType.list.title.singular';
|
||||
|
||||
const relationShipNumber = props.listContent.attributes.filter(attr => has(attr.params, 'model')).length;
|
||||
const relationShipNumber = props.listContent.attributes.filter(attr => has(attr.params, 'target')).length;
|
||||
|
||||
const relationShipTitle = relationShipNumber > 1 ? 'modelPage.contentType.list.relationShipTitle.plural'
|
||||
: 'modelPage.contentType.list.relationShipTitle.singular';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user