Skip to content

Commit

Permalink
fix(fuselage): add Callout missing background-color (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti authored Oct 31, 2023
1 parent 7e84e2e commit a95b2f7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-pigs-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/fuselage": patch
---

fix(fuselage): add `Callout` missing background-color
6 changes: 6 additions & 0 deletions packages/fuselage/src/components/Callout/Callout.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
@use '../../styles/lengths.scss';
@use '../../styles/typography.scss';

$callout-background-color: theme(
'callout-background-color',
colors.surface(light)
);
$callout-default-color: theme(
'callout-default-color',
colors.font(secondary-info)
Expand Down Expand Up @@ -34,6 +38,8 @@ $callout-text-color: theme('callout-text-color', colors.font(default));

border-radius: theme('callout-border-radius', lengths.border-radius(medium));

background-color: $callout-background-color;

&--info {
border-color: $callout-info-color;

Expand Down
4 changes: 1 addition & 3 deletions packages/fuselage/src/components/Callout/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export const Callout = ({
return (
<Box
is='section'
className={[
`rcx-callout ${type && `rcx-callout--${type}`} ${className || ''}`,
]
className={['rcx-callout', type && `rcx-callout--${type}`, className]
.filter(Boolean)
.join(' ')}
{...props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`[CheckBox Rendering] renders CustomIcon without crashing 1`] = `
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout undefined "
class="rcx-box rcx-box--full rcx-callout"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -35,7 +35,7 @@ exports[`[CheckBox Rendering] renders Danger without crashing 1`] = `
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout rcx-callout--danger "
class="rcx-box rcx-box--full rcx-callout rcx-callout--danger"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -66,7 +66,7 @@ exports[`[CheckBox Rendering] renders Default without crashing 1`] = `
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout undefined "
class="rcx-box rcx-box--full rcx-callout"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -97,7 +97,7 @@ exports[`[CheckBox Rendering] renders Info without crashing 1`] = `
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout rcx-callout--info "
class="rcx-box rcx-box--full rcx-callout rcx-callout--info"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -128,7 +128,7 @@ exports[`[CheckBox Rendering] renders Success without crashing 1`] = `
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout rcx-callout--success "
class="rcx-box rcx-box--full rcx-callout rcx-callout--success"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -159,7 +159,7 @@ exports[`[CheckBox Rendering] renders Warning without crashing 1`] = `
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout rcx-callout--warning "
class="rcx-box rcx-box--full rcx-callout rcx-callout--warning"
>
<i
aria-hidden="true"
Expand Down Expand Up @@ -190,7 +190,7 @@ exports[`[CheckBox Rendering] renders WithDescriptionOnly without crashing 1`] =
<body>
<div>
<section
class="rcx-box rcx-box--full rcx-callout undefined "
class="rcx-box rcx-box--full rcx-callout"
>
<i
aria-hidden="true"
Expand Down

0 comments on commit a95b2f7

Please sign in to comment.