diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-13 22:29:12 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-13 22:29:12 +0800 |
commit | ca25b816fabe15ce1ebc539c0316beba813683b8 (patch) | |
tree | 0e28bbc819cfccda1789192628c365ea54328103 /packages/react-docs/src/components/source_link.tsx | |
parent | df1968157c13a7bbe2e512cbc924190a414e6738 (diff) | |
download | dexon-0x-contracts-ca25b816fabe15ce1ebc539c0316beba813683b8.tar.gz dexon-0x-contracts-ca25b816fabe15ce1ebc539c0316beba813683b8.tar.zst dexon-0x-contracts-ca25b816fabe15ce1ebc539c0316beba813683b8.zip |
move scripts to monorepro-scripts
Diffstat (limited to 'packages/react-docs/src/components/source_link.tsx')
-rw-r--r-- | packages/react-docs/src/components/source_link.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/react-docs/src/components/source_link.tsx b/packages/react-docs/src/components/source_link.tsx new file mode 100644 index 000000000..89956a507 --- /dev/null +++ b/packages/react-docs/src/components/source_link.tsx @@ -0,0 +1,23 @@ +import { colors } from '@0xproject/react-shared'; +import * as _ from 'lodash'; +import * as React from 'react'; + +import { Source } from '../types'; + +export interface SourceLinkProps { + source: Source; + sourceUrl: string; + version: string; +} + +export function SourceLink(props: SourceLinkProps) { + const src = props.source; + const sourceCodeUrl = `${props.sourceUrl}/${src.fileName}#L${src.line}`; + return ( + <div className="pt2" style={{ fontSize: 14 }}> + <a href={sourceCodeUrl} target="_blank" className="underline" style={{ color: colors.grey }}> + Source + </a> + </div> + ); +} |