Skip to content

Commit

Permalink
fix: fill FlairIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
Niznikr committed Oct 15, 2024
1 parent e57a521 commit 152a5e6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
12 changes: 8 additions & 4 deletions packages/components/src/styles/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
border-width: 1px;
outline: none;
white-space: nowrap;

& [data-icon] {
fill: currentColor;
}
}

.base[data-focus-visible] {
Expand Down Expand Up @@ -72,6 +68,10 @@
border-color: var(--lp-color-border-interactive-primary-base);
color: var(--lp-color-text-interactive-primary-base);
z-index: 1;

& [data-icon] {
fill: var(--lp-color-text-interactive-primary-base);
}
}

.primary[data-hovered] {
Expand All @@ -97,6 +97,10 @@
background-color: var(--lp-color-bg-interactive-destructive-base);
border-color: var(--lp-color-border-interactive-destructive);
color: var(--lp-color-text-interactive-destructive);

& [data-icon] {
fill: var(--lp-color-fill-interactive-destructive);
}
}

.destructive[data-hovered] {
Expand Down
8 changes: 7 additions & 1 deletion packages/icons/src/FlairIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
import type { BoxProps } from '@launchpad-ui/box';

import { Box } from '@launchpad-ui/box';
import { cva, cx } from 'class-variance-authority';

import styles from './styles/FlairIcon.module.css';

const flair = cva(styles.flair);

interface FlairIconProps extends BoxProps {}

const FlairIcon = ({ children, ...props }: FlairIconProps) => {
const FlairIcon = ({ children, className, ...props }: FlairIconProps) => {
return (
<Box
background="$purple-blue"
borderRadius="50%"
color="$white.950"
display="inline-flex"
padding="$400"
className={cx(flair(), className)}
{...props}
>
{children}
Expand Down
5 changes: 5 additions & 0 deletions packages/icons/src/styles/FlairIcon.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.flair {
& [data-icon] {
fill: var(--lp-color-white-950);
}
}

0 comments on commit 152a5e6

Please sign in to comment.