woocommerce/plugins/woocommerce-admin/client/components/link
Justin Shreve 22028283ef Add Activity Panel Outbound Link Component (https://github.com/woocommerce/woocommerce-admin/pull/213)
* Activity Panel Outbound Link

* Address PR Feedback: Pass through additional props on ActivityOutboundLink, add comment for activity panel wrapping padding, fix README naming, and use $gap $gutter trick for outbound link padding.
2018-07-17 14:51:56 -04:00
..
README.md Add Activity Panel Outbound Link Component (https://github.com/woocommerce/woocommerce-admin/pull/213) 2018-07-17 14:51:56 -04:00
index.js Add Activity Panel Outbound Link Component (https://github.com/woocommerce/woocommerce-admin/pull/213) 2018-07-17 14:51:56 -04:00

README.md

Link

Use Link to create a link to another resource. It accepts a type to automatically create wp-admin links, wc-admin links, and external links.

How to use:

import Link from 'components/link';

render: function() {
  return (
	<Link
		href="edit.php?post_type=shop_coupon"
		type="wp-admin"
	>
		Coupons
	</Link>
  );
}

Props

  • href (required): The resource to link to.
  • type (required): Type of link. For wp-admin and wc-admin, the correct prefix is appended. Accepts: wc-admin, wp-admin, external.