woocommerce/plugins/woocommerce-blocks/assets/js/icons/library/alert.tsx

37 lines
885 B
TypeScript
Raw Normal View History

Highlight incompatible payment gateways (https://github.com/woocommerce/woocommerce-blocks/pull/7412) * Set up incompatiblePaymentMethods in data store * Save incompatible payment methods in data store * Create the IncompatibilityPaymentGatewaysNotice * Fix hidden notice bug * Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir * Add all registered methods to incompatiblePaymentMethods state * Rename selector to getIncompatiblePaymentMethods * Remove incompatible methods when adding available ones * Remove unused reducer cases * Stop adding incompatible methods now that we add them in default state * Display incompatible methods in the notice from the data store * Refactor incompatible payment gateways notice * Update the incompatible extensions notice's design * Hide Make as default notice We hide this notice while the notification for incompatible payment gateways is visible * Hide the sidebar compatibility notice Hide this notice while the notification for incompatible payment gateways is visible. And show it otherwise. * Capitalize the label for the button on the page settings notice * Fix missing 'globalPaymentMethods' bug on frontend * Highlight incompatible payments in sidebar Highlight incompatible payment gateways within the Payment Options Block * Rename the incompatible gateways notice's component * Support plural and singular forms for the notice * Update incompatible extensions notice's design * Use the simplified types import Co-authored-by: Niels Lange <info@nielslange.de> * Add translation support to notice message * Fix failing unit tests Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Niels Lange <info@nielslange.de>
2022-12-28 16:30:46 +00:00
/**
* External dependencies
*/
import { IconProps } from '@wordpress/icons/build-types/icon';
Highlight incompatible payment gateways (https://github.com/woocommerce/woocommerce-blocks/pull/7412) * Set up incompatiblePaymentMethods in data store * Save incompatible payment methods in data store * Create the IncompatibilityPaymentGatewaysNotice * Fix hidden notice bug * Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir * Add all registered methods to incompatiblePaymentMethods state * Rename selector to getIncompatiblePaymentMethods * Remove incompatible methods when adding available ones * Remove unused reducer cases * Stop adding incompatible methods now that we add them in default state * Display incompatible methods in the notice from the data store * Refactor incompatible payment gateways notice * Update the incompatible extensions notice's design * Hide Make as default notice We hide this notice while the notification for incompatible payment gateways is visible * Hide the sidebar compatibility notice Hide this notice while the notification for incompatible payment gateways is visible. And show it otherwise. * Capitalize the label for the button on the page settings notice * Fix missing 'globalPaymentMethods' bug on frontend * Highlight incompatible payments in sidebar Highlight incompatible payment gateways within the Payment Options Block * Rename the incompatible gateways notice's component * Support plural and singular forms for the notice * Update incompatible extensions notice's design * Use the simplified types import Co-authored-by: Niels Lange <info@nielslange.de> * Add translation support to notice message * Fix failing unit tests Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Niels Lange <info@nielslange.de>
2022-12-28 16:30:46 +00:00
import { SVG } from '@wordpress/primitives';
interface AlertProps {
status?: 'warning' | 'error' | 'success' | 'info';
props?: IconProps;
}
const statusToColorMap = {
warning: '#F0B849',
error: '#CC1818',
success: '#46B450',
info: '#0073AA',
};
const Alert = ( { status = 'warning', ...props }: AlertProps ) => (
<SVG
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
{ ...props }
>
Highlight incompatible payment gateways (https://github.com/woocommerce/woocommerce-blocks/pull/7412) * Set up incompatiblePaymentMethods in data store * Save incompatible payment methods in data store * Create the IncompatibilityPaymentGatewaysNotice * Fix hidden notice bug * Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir * Add all registered methods to incompatiblePaymentMethods state * Rename selector to getIncompatiblePaymentMethods * Remove incompatible methods when adding available ones * Remove unused reducer cases * Stop adding incompatible methods now that we add them in default state * Display incompatible methods in the notice from the data store * Refactor incompatible payment gateways notice * Update the incompatible extensions notice's design * Hide Make as default notice We hide this notice while the notification for incompatible payment gateways is visible * Hide the sidebar compatibility notice Hide this notice while the notification for incompatible payment gateways is visible. And show it otherwise. * Capitalize the label for the button on the page settings notice * Fix missing 'globalPaymentMethods' bug on frontend * Highlight incompatible payments in sidebar Highlight incompatible payment gateways within the Payment Options Block * Rename the incompatible gateways notice's component * Support plural and singular forms for the notice * Update incompatible extensions notice's design * Use the simplified types import Co-authored-by: Niels Lange <info@nielslange.de> * Add translation support to notice message * Fix failing unit tests Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Niels Lange <info@nielslange.de>
2022-12-28 16:30:46 +00:00
<path
d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z"
stroke={ statusToColorMap[ status ] }
Highlight incompatible payment gateways (https://github.com/woocommerce/woocommerce-blocks/pull/7412) * Set up incompatiblePaymentMethods in data store * Save incompatible payment methods in data store * Create the IncompatibilityPaymentGatewaysNotice * Fix hidden notice bug * Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir * Add all registered methods to incompatiblePaymentMethods state * Rename selector to getIncompatiblePaymentMethods * Remove incompatible methods when adding available ones * Remove unused reducer cases * Stop adding incompatible methods now that we add them in default state * Display incompatible methods in the notice from the data store * Refactor incompatible payment gateways notice * Update the incompatible extensions notice's design * Hide Make as default notice We hide this notice while the notification for incompatible payment gateways is visible * Hide the sidebar compatibility notice Hide this notice while the notification for incompatible payment gateways is visible. And show it otherwise. * Capitalize the label for the button on the page settings notice * Fix missing 'globalPaymentMethods' bug on frontend * Highlight incompatible payments in sidebar Highlight incompatible payment gateways within the Payment Options Block * Rename the incompatible gateways notice's component * Support plural and singular forms for the notice * Update incompatible extensions notice's design * Use the simplified types import Co-authored-by: Niels Lange <info@nielslange.de> * Add translation support to notice message * Fix failing unit tests Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Niels Lange <info@nielslange.de>
2022-12-28 16:30:46 +00:00
strokeWidth="1.5"
/>
<path d="M13 7H11V13H13V7Z" fill={ statusToColorMap[ status ] } />
<path d="M13 15H11V17H13V15Z" fill={ statusToColorMap[ status ] } />
Highlight incompatible payment gateways (https://github.com/woocommerce/woocommerce-blocks/pull/7412) * Set up incompatiblePaymentMethods in data store * Save incompatible payment methods in data store * Create the IncompatibilityPaymentGatewaysNotice * Fix hidden notice bug * Rename "paymentAdminLink" to GlobalPaymentMethod and move to types dir * Add all registered methods to incompatiblePaymentMethods state * Rename selector to getIncompatiblePaymentMethods * Remove incompatible methods when adding available ones * Remove unused reducer cases * Stop adding incompatible methods now that we add them in default state * Display incompatible methods in the notice from the data store * Refactor incompatible payment gateways notice * Update the incompatible extensions notice's design * Hide Make as default notice We hide this notice while the notification for incompatible payment gateways is visible * Hide the sidebar compatibility notice Hide this notice while the notification for incompatible payment gateways is visible. And show it otherwise. * Capitalize the label for the button on the page settings notice * Fix missing 'globalPaymentMethods' bug on frontend * Highlight incompatible payments in sidebar Highlight incompatible payment gateways within the Payment Options Block * Rename the incompatible gateways notice's component * Support plural and singular forms for the notice * Update incompatible extensions notice's design * Use the simplified types import Co-authored-by: Niels Lange <info@nielslange.de> * Add translation support to notice message * Fix failing unit tests Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> Co-authored-by: Niels Lange <info@nielslange.de>
2022-12-28 16:30:46 +00:00
</SVG>
);
export default Alert;