MyCrypto/common/components/ui/NewTabLink.tsx
William O'Beirne aa0f9cd455 Electron Redesign (#1505)
* Frameless Electron. Separate electron template. Generecize navigation link. Move nav info to config.

* Add controls for language and node, network status to sidebar.

* Sticky headers

* Move custom node modal into standalone component. Render modals via portal. Add custom node modal opening to electron node list.

* Conditional styling based on environment.

* Fix active node highlight

* Add frame back in, draggable only on OSX, fix sidebar scroll.

* Remove panel content after delay.

* Adjust window sizes

* Style desktop help nav icon

* Remove unused var

* Move style to param

* Remove unused

* Update snapshot

* Fix oversized stretching, zindex fighting

* Make electron work better with various screen sizes

* Remove not-working https option for electron

* Add beta banner

* Fix web footer

* Address changes
2018-04-16 18:30:58 -05:00

58 lines
1.2 KiB
TypeScript

import React from 'react';
export interface AAttributes {
charset?: string;
className?: string;
coords?: string;
download?: string;
hreflang?: string;
media?: string;
name?: string;
rel?:
| 'alternate'
| 'author'
| 'bookmark'
| 'external'
| 'help'
| 'license'
| 'next'
| 'nofollow'
| 'noreferrer'
| 'noopener'
| 'prev'
| 'search'
| 'tag';
rev?: string;
shape?: 'default' | 'rect' | 'circle' | 'poly';
target?: '_blank' | '_parent' | '_self' | '_top';
type?: string;
onClick?(ev: React.MouseEvent<HTMLAnchorElement>): void;
}
interface NewTabLinkProps extends AAttributes {
href: string;
content?:
| React.ReactElement<any>
| string
| number
| (string | number | React.ReactElement<any>)[];
children?:
| React.ReactElement<any>
| string
| number
| (string | number | React.ReactElement<any>)[];
}
export class NewTabLink extends React.Component<NewTabLinkProps> {
public render() {
const { content, children, ...rest } = this.props;
return (
<a target="_blank" rel="noopener noreferrer" {...rest}>
{content || children}
</a>
);
}
}
export default NewTabLink;