Skip to content

Commit

Permalink
fix(label): adds missing icon and corrects class typo (#1902)
Browse files Browse the repository at this point in the history
* fix(label): adds missing icon and corrects class type

* fix: hello linter my old friend
  • Loading branch information
pixelflips authored Jul 1, 2024
1 parent a77a8b2 commit 35d35d5
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' : ''}`}
/>
)}
<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 35d35d5

Please sign in to comment.