Skip to content

Commit

Permalink
fix: update css class naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Perez authored and Andrew Perez committed Jun 12, 2024
1 parent d6da56d commit e390a2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/sage-assets/lib/stylesheets/components/_card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


// Default background option
$-sage-frame-background: transparent;
$-sage-card-background: transparent;

.sage-card {
@include sage-card();
Expand Down Expand Up @@ -165,7 +165,7 @@ $-sage-frame-background: transparent;

@each $-color, $-sliders in $sage-colors {
@each $-number, $-configs in $-sliders {
.sage-frame--background-#{"" + $-color}-#{$-number} {
.sage-card--background-#{"" + $-color}-#{$-number} {
background: #{sage-color($-color, $-number)};
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/sage-react/lib/Card/CardHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ export const CardHeader = ({ background, children, ...rest }) => {
&& !Object.values(SageTokens.COLOR_SLIDERS).includes(background);

if (hasCustomBackground) {
styles['--sage-frame-background'] = background;
styles['--sage-card-background'] = background;
}

return (
<div
className={
[
'sage-card__header-layout',
hasCustomBackground ? 'sage-frame--background-custom' : '',
background && !hasCustomBackground ? `sage-frame--background-${background}` : ''
hasCustomBackground ? 'sage-card--background-custom' : '',
background && !hasCustomBackground ? `sage-card--background-${background}` : ''
].filter((x) => x).join(' ')
}
{...rest}
Expand Down

0 comments on commit e390a2c

Please sign in to comment.