diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-18 05:44:08 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-18 05:44:08 +0800 |
commit | 6d66476d35b67f91563c1a06f25fea9fc2fb4320 (patch) | |
tree | 86905ccb713c39cbcd0e9aded2f0981a6388332b /packages | |
parent | 039b95c8c1423bb165cb18b48a6ee3671603fb1a (diff) | |
download | dexon-0x-contracts-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.gz dexon-0x-contracts-6d66476d35b67f91563c1a06f25fea9fc2fb4320.tar.zst dexon-0x-contracts-6d66476d35b67f91563c1a06f25fea9fc2fb4320.zip |
Action takes in useAnchorTag
Diffstat (limited to 'packages')
-rw-r--r-- | packages/website/ts/@next/components/definition.tsx | 13 |
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> ))} |