aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-18 05:44:08 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-18 05:44:08 +0800
commit6d66476d35b67f91563c1a06f25fea9fc2fb4320 (patch)
tree86905ccb713c39cbcd0e9aded2f0981a6388332b
parent039b95c8c1423bb165cb18b48a6ee3671603fb1a (diff)
downloaddexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar
dexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.gz
dexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.bz2
dexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.lz
dexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.xz
dexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.zst
dexon-sol-tools-6d66476d35b67f91563c1a06f25fea9fc2fb4320.zip
Action takes in useAnchorTag
-rw-r--r--packages/website/ts/@next/components/definition.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/website/ts/@next/components/definition.tsx b/packages/website/ts/@next/components/definition.tsx
index da26ee140..be0973bdd 100644
--- a/packages/website/ts/@next/components/definition.tsx
+++ b/packages/website/ts/@next/components/definition.tsx
@@ -7,7 +7,9 @@ import { Heading, Paragraph } from 'ts/@next/components/text';
interface Action {
label: string;
- url: string;
+ url?: string;
+ onClick?: () => void;
+ useAnchorTag?: boolean;
}
interface Props {
@@ -46,7 +48,14 @@ export const Definition = (props: Props) => (
{props.actions && (
<LinkWrap>
{props.actions.map((item, index) => (
- <Button key={`dlink-${index}`} href={item.url} isWithArrow={true} isAccentColor={true}>
+ <Button
+ key={`dlink-${index}`}
+ href={item.url}
+ onClick={item.onClick}
+ isWithArrow={true}
+ isAccentColor={true}
+ useAnchorTag={item.useAnchorTag}
+ >
{item.label}
</Button>
))}