mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Move icons to constants
This commit is contained in:
parent
eeb0c63200
commit
a78e11c8e8
3 changed files with 15 additions and 5 deletions
|
@ -1 +1,3 @@
|
|||
export { default as openSignup } from './Icons/open-signup';
|
||||
export const NOTIFICATION_SUCCESS = '✔️';
|
||||
export const NOTIFICATION_ERROR = '❌';
|
||||
|
|
|
@ -4,6 +4,10 @@ import { ButtonSettingsBlock } from '../../../../../ReusableComponents/SettingsB
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { useDispatch } from '@wordpress/data';
|
||||
import { store as noticesStore } from '@wordpress/notices';
|
||||
import {
|
||||
NOTIFICATION_ERROR,
|
||||
NOTIFICATION_SUCCESS,
|
||||
} from '../../../../../ReusableComponents/Icons';
|
||||
|
||||
const ResubscribeBlock = () => {
|
||||
const { createSuccessNotice, createErrorNotice } =
|
||||
|
@ -24,7 +28,7 @@ const ResubscribeBlock = () => {
|
|||
'woocommerce-paypal-payments'
|
||||
),
|
||||
{
|
||||
icon: '❌',
|
||||
icon: NOTIFICATION_ERROR,
|
||||
}
|
||||
);
|
||||
return;
|
||||
|
@ -37,7 +41,7 @@ const ResubscribeBlock = () => {
|
|||
'woocommerce-paypal-payments'
|
||||
),
|
||||
{
|
||||
icon: '✔️',
|
||||
icon: NOTIFICATION_SUCCESS,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
@ -4,6 +4,10 @@ import { ButtonSettingsBlock } from '../../../../../ReusableComponents/SettingsB
|
|||
import { useDispatch } from '@wordpress/data';
|
||||
import { store as noticesStore } from '@wordpress/notices';
|
||||
import { CommonHooks } from '../../../../../../data';
|
||||
import {
|
||||
NOTIFICATION_ERROR,
|
||||
NOTIFICATION_SUCCESS,
|
||||
} from '../../../../../ReusableComponents/Icons';
|
||||
|
||||
const SimulationBlock = () => {
|
||||
const {
|
||||
|
@ -52,7 +56,7 @@ const SimulationBlock = () => {
|
|||
'woocommerce-paypal-payments'
|
||||
),
|
||||
{
|
||||
icon: '❌',
|
||||
icon: NOTIFICATION_ERROR,
|
||||
}
|
||||
);
|
||||
return;
|
||||
|
@ -78,7 +82,7 @@ const SimulationBlock = () => {
|
|||
'woocommerce-paypal-payments'
|
||||
),
|
||||
{
|
||||
icon: '✔️',
|
||||
icon: NOTIFICATION_SUCCESS,
|
||||
}
|
||||
);
|
||||
stopSimulation();
|
||||
|
@ -97,7 +101,7 @@ const SimulationBlock = () => {
|
|||
'woocommerce-paypal-payments'
|
||||
),
|
||||
{
|
||||
icon: '❌',
|
||||
icon: NOTIFICATION_ERROR,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue