aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/button.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/@next/components/button.tsx')
-rw-r--r--packages/website/ts/@next/components/button.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/website/ts/@next/components/button.tsx b/packages/website/ts/@next/components/button.tsx
index 4c8c0361e..b686b27a2 100644
--- a/packages/website/ts/@next/components/button.tsx
+++ b/packages/website/ts/@next/components/button.tsx
@@ -19,6 +19,7 @@ interface ButtonInterface {
isInline?: boolean;
href?: string;
type?: string;
+ target?: string;
to?: string;
onClick?: () => any;
theme?: ThemeInterface;
@@ -26,7 +27,7 @@ interface ButtonInterface {
}
export const Button = (props: ButtonInterface) => {
- const { children, href, isWithArrow, to, useAnchorTag } = props;
+ const { children, href, isWithArrow, to, useAnchorTag, target } = props;
let linkElem;
if (href || useAnchorTag) {
@@ -37,9 +38,10 @@ export const Button = (props: ButtonInterface) => {
}
const Component = linkElem ? ButtonBase.withComponent(linkElem) : ButtonBase;
+ const targetProp = href && target ? { target } : {};
return (
- <Component {...props}>
+ <Component {...props} {...targetProp}>
{children}
{isWithArrow && (