Skip to content

Commit

Permalink
fix(label): adds missing icon and corrects class type
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelflips committed Jun 24, 2024
1 parent 612be1b commit 95bb9c3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/sage-react/lib/Label/Label.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { SageTokens } from '../configs';
import { SageTokens, SageClassnames } from '../configs';
import {
LABEL_COLORS,
LABEL_STYLES,
Expand Down Expand Up @@ -61,13 +61,19 @@ export const Label = React.forwardRef(({
type={interactiveType ? 'button' : null}
{...rest}
>
{icon && (
<pds-icon
name={icon}
class={`${SageClassnames.SPACERS.XS_RIGHT} ${icon && customIconColor ? "sage-label--icon--custom-color" : ""}`}

Check failure on line 67 in packages/sage-react/lib/Label/Label.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build (16)

Strings must use singlequote

Check failure on line 67 in packages/sage-react/lib/Label/Label.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build (16)

Strings must use singlequote

Check failure on line 67 in packages/sage-react/lib/Label/Label.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build (18)

Strings must use singlequote

Check failure on line 67 in packages/sage-react/lib/Label/Label.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build (18)

Strings must use singlequote

Check failure on line 67 in packages/sage-react/lib/Label/Label.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build (20)

Strings must use singlequote

Check failure on line 67 in packages/sage-react/lib/Label/Label.jsx

View workflow job for this annotation

GitHub Actions / Lint, Test, Build (20)

Strings must use singlequote
/>
)}
<span className="sage-label__value-text">
{value}
</span>
</TagName>
{interactiveType === LABEL_INTERACTIVE_TYPES.SECONDARY_BUTTON && secondaryButton}
{(interactiveType === LABEL_INTERACTIVE_TYPES.DROPDOWN) && (
<pds-icon className="sage-label__decor-icon" name="down-small" />
<pds-icon class="sage-label__decor-icon" name="down-small" />
)}
</span>
);
Expand Down

0 comments on commit 95bb9c3

Please sign in to comment.