Make `Notice` component legible in dark themes (https://github.com/woocommerce/woocommerce-blocks/pull/8278)

* Make Notice component color black

The Notice component text is not legible in dark themes since the background color
is light and and the text color is too. With this change we are setting the color
always to black for our blocks, so it's always legible.

* Make the text black for notices displayed on the editor

* Import editor.scss
This commit is contained in:
Alba Rincón 2023-01-25 15:29:17 +01:00 committed by GitHub
parent d4806016c9
commit f830740908
8 changed files with 23 additions and 0 deletions

View File

@ -47,3 +47,7 @@
}
}
.wc-block-attribute-filter .components-notice__content {
color: $black;
}

View File

@ -20,6 +20,7 @@ import {
AdditionalFieldsContent,
} from '../../form-step';
import Block from './block';
import './editor.scss';
type shippingAdminLink = {
id: number;

View File

@ -0,0 +1,3 @@
.wc-block-components-shipping-rates-control__no-results-notice .components-notice__content {
color: $black;
}

View File

@ -34,3 +34,6 @@
}
}
.wc-block-checkout__terms_notice .components-notice__content {
color: $black;
}

View File

@ -21,6 +21,7 @@ import {
*/
import Block from './block';
import { Attributes } from './types';
import './editor.scss';
const Edit = ( {
attributes,

View File

@ -0,0 +1,3 @@
.wc-block-rating-filter .components-notice__content {
color: $black;
}

View File

@ -5,6 +5,11 @@ import { useBlockProps } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';
import { Notice } from '@wordpress/components';
/**
* Internal dependencies
*/
import './editor.scss';
const Edit = (): JSX.Element => {
const blockProps = useBlockProps( {
className: 'wc-block-store-notices',

View File

@ -0,0 +1,3 @@
.wc-block-store-notices .components-notice__content {
color: $black;
}