Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fuselage): add Callout missing background-color #1210

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading