mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
✨ Finish the LearnMore component
This commit is contained in:
parent
badef20dc5
commit
990b945372
2 changed files with 9 additions and 5 deletions
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue