Files
BitwiseCmd/src/components/CommandLink.tsx
Borys Levytskyi 271c58a980 Migrate to typescript (#14)
* Move BitwiseCmd to typescript

* Add serve-build http command

* Add Env type

* Add CNAME and sitemap.xml files

* Add files via upload
2021-01-12 16:41:03 +02:00

13 lines
317 B
TypeScript

import React from 'react';
import cmd from '../core/cmd';
type CommandLinkProps = {
command?:string;
text:string;
}
function CommandLink(props: CommandLinkProps) {
return <a href="javascript:void(0)" onClick={e => cmd.execute(props.command || props.text)}>{props.text}</a>
}
export default CommandLink;