Skip to content

Commit

Permalink
Refs #267520 - Fix test. Improve styles
Browse files Browse the repository at this point in the history
  • Loading branch information
GhitaB committed Mar 25, 2024
1 parent 357a70f commit 033fa35
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/theme/Views/NewsItemView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ import './styles.less';
const SubjectTags = (props) => {
const tags = props.content?.subjects;
return tags?.length > 0 ? (
<>
<div className="subject-tags">
Filed under:{' '}
{tags.map((tag) => (
<Label key={tag}>{tag}</Label>
<Label size="small" key={tag}>
{tag}
</Label>
))}
</>
</div>
) : null;
};

Expand Down
1 change: 1 addition & 0 deletions src/components/theme/Views/NewsItemView.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('NewsItemView', () => {
it('should render the component', () => {
const content = {
title: 'NewsItemView',
blocks: {},
};

const store = mockStore({
Expand Down
8 changes: 8 additions & 0 deletions src/components/theme/Views/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,12 @@ div.insitu-newsitem-view {
background: #ccc;
}
}

div.subject-tags {
.label {
margin: 0.5em;
}

margin-bottom: 2em;
}
}

0 comments on commit 033fa35

Please sign in to comment.