Finish the LearnMore component

This commit is contained in:
Philipp Stracker 2025-01-29 18:12:56 +01:00
parent badef20dc5
commit 990b945372
No known key found for this signature in database
2 changed files with 9 additions and 5 deletions

View file

@ -1,12 +1,15 @@
import { __ } from '@wordpress/i18n';
import { Button } from '@wordpress/components';
const LearnMore = ( { url } ) => {
if ( ! url || '#' === url ) {
console.warn( 'Missing Learn More URL: ', url );
return null;
}
return (
<a href={ url } target="_blank" rel="noreferrer">
Learn more
</a>
<Button href={ url } variant="tertiary" target="_blank">
{ __( 'Learn more', 'woocommerce-paypal-payments' ) }
</Button>
);
};

View file

@ -7,7 +7,8 @@ export { default as Content } from './Content';
export { default as ContentWrapper } from './ContentWrapper';
export { default as Description } from './Description';
export { default as Header } from './Header';
export { default as LearnMore } from './LearnMore';
export { default as Separator } from './Separator';
export { default as Title } from './Title';
export { default as TitleExtra } from './TitleExtra';
export { default as TitleWrapper } from './TitleWrapper';
export { default as Separator } from './Separator';