Skip to content

Commit

Permalink
budgeting/ListItemBadges: rm spaced span as produced empty elements a…
Browse files Browse the repository at this point in the history
…nd replaced span badges with div badges
  • Loading branch information
philli-m authored and fuzzylogic2000 committed Nov 24, 2022
1 parent 728083b commit 417cdf7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 deletions.
9 changes: 4 additions & 5 deletions meinberlin/apps/budgeting/assets/ListItemBadges.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import { SpacedSpan } from './SpacedSpan'
import django from 'django'

const translated = {
Expand Down Expand Up @@ -30,24 +29,24 @@ export const ListItemBadges = props => {
<div className="list-item__labels">
{props.badges.map((badge, idx) => {
return (
<SpacedSpan
<div
key={'badge_' + idx}
className={getClass(badge)}
>
{hasPointLabelIcon(badge[0])}
{badge[1]}
</SpacedSpan>
</div>
)
})}
{props.numOfMoreBadges > 0 &&
<SpacedSpan className="label__link label--big">
<div className="label__link label--big">
<a
href={props.proposalUrl}
className="list-item__link"
>
{props.numOfMoreBadges + ' ' + translated.more}
</a>
</SpacedSpan>}
</div>}
</div>
)
}
12 changes: 0 additions & 12 deletions meinberlin/apps/budgeting/assets/SpacedSpan.jsx

This file was deleted.

10 changes: 0 additions & 10 deletions meinberlin/apps/budgeting/assets/__tests__/SpacedSpan.jest.jsx

This file was deleted.

2 changes: 2 additions & 0 deletions meinberlin/assets/scss/components/_list_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
@include clearfix;
margin: 0 0 0.4rem;

> div.label,
> span.label {
margin-left: 0.2 * $spacer;
overflow: hidden;
max-width: 40ch;
text-overflow: ellipsis;
Expand Down

0 comments on commit 417cdf7

Please sign in to comment.