Skip to content

Commit

Permalink
hotfix(condo): fix tag in services cards (#4416)
Browse files Browse the repository at this point in the history
  • Loading branch information
nomerdvadcatpyat authored Feb 22, 2024
1 parent 24493a3 commit bc41773
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/Card/header/cardHeader.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
}

& .condo-tag {
&-header-tag {
position: absolute;
top: @condo-global-spacing-8;
right: @condo-global-spacing-8;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/Card/header/cardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const CardHeader: React.FC<CardHeaderProps> = (props) => {

return (
<>
{tag && <Tag {...tag} />}
{tag && <Tag {...tag} className={`${CARD_CLASS_PREFIX}-header-tag`} />}
{headerContent}
</>
)
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/components/Tag/tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type TagProps = React.HTMLAttributes<HTMLSpanElement> & {
bgColor?: CSSProperties['backgroundColor']
icon?: React.ReactNode
iconPosition?: 'start' | 'end'
className?: string
}

const Tag = React.forwardRef<HTMLSpanElement, TagProps>((props, ref) => {
Expand All @@ -22,6 +23,7 @@ const Tag = React.forwardRef<HTMLSpanElement, TagProps>((props, ref) => {
bgColor = colors.gray['1'],
iconPosition = 'start',
icon,
className,
} = props

return (
Expand All @@ -47,6 +49,7 @@ const Tag = React.forwardRef<HTMLSpanElement, TagProps>((props, ref) => {
color: textColor,
background: bgColor,
}}
className={className}
/>
)
})
Expand Down

0 comments on commit bc41773

Please sign in to comment.