Skip to content

Commit

Permalink
chore(Group): namespace error class
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm committed Jul 17, 2023
1 parent 1332bb7 commit 33d4fb4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions assets/properties-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
background-color: var(--dot-color);
}

.bio-properties-panel-dot.error {
.bio-properties-panel-dot--error {
background-color: var(--dot-color-error);
}

Expand Down Expand Up @@ -387,7 +387,7 @@
background-color: var(--list-badge-background-color);
}

.bio-properties-panel-list-badge.error {
.bio-properties-panel-list-badge--error {
background-color: var(--dot-color-error);
}

Expand Down
5 changes: 2 additions & 3 deletions src/components/Group.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ export default function Group(props) {
'bio-properties-panel-group-header',
edited ? '' : 'empty',
open ? 'open' : '',
(sticky && open) ? 'sticky' : '',
hasErrors ? 'error' : ''
(sticky && open) ? 'sticky' : ''
) } onClick={ toggleOpen }>
<div title={ label } class="bio-properties-panel-group-header-title">
{ label }
Expand Down Expand Up @@ -147,7 +146,7 @@ function DataMarker(props) {

if (hasErrors) {
return (
<div title="Section contains an error" class="bio-properties-panel-dot error"></div>
<div title="Section contains an error" class="bio-properties-panel-dot bio-properties-panel-dot--error"></div>
);
}

Expand Down
5 changes: 2 additions & 3 deletions src/components/ListGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ export default function ListGroup(props) {
'bio-properties-panel-group-header',
hasItems ? '' : 'empty',
(hasItems && open) ? 'open' : '',
(sticky && open) ? 'sticky' : '',
hasError ? 'error' : ''
(sticky && open) ? 'sticky' : ''
) }
onClick={ hasItems ? toggleOpen : noop }>
<div
Expand Down Expand Up @@ -230,7 +229,7 @@ export default function ListGroup(props) {
class={
classnames(
'bio-properties-panel-list-badge',
hasError ? 'error' : ''
hasError ? 'bio-properties-panel-list-badge--error' : ''
)
}
>
Expand Down
2 changes: 1 addition & 1 deletion test/spec/components/Group.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe('<Group>', function() {

const header = domQuery('.bio-properties-panel-group-header', result.container);

const errorMarker = domQuery('.bio-properties-panel-dot.error', header);
const errorMarker = domQuery('.bio-properties-panel-dot--error', header);

// then
expect(errorMarker).to.exist;
Expand Down
4 changes: 2 additions & 2 deletions test/spec/components/ListGroup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('<ListGroup>', function() {

const { container } = createListGroup({ container: parentContainer, items, errors });

const errorBadge = domQuery('.bio-properties-panel-list-badge.error', container);
const errorBadge = domQuery('.bio-properties-panel-list-badge--error', container);

// then
expect(errorBadge).to.exist;
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('<ListGroup>', function() {

const { container } = createListGroup({ container: parentContainer, items, errors });

const errorBadge = domQuery('.bio-properties-panel-list-badge.error', container);
const errorBadge = domQuery('.bio-properties-panel-list-badge--error', container);

// then
expect(errorBadge).to.exist;
Expand Down

0 comments on commit 33d4fb4

Please sign in to comment.