1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-15 21:08:57 +00:00
trezor-wallet/src/components/Header/index.js

50 lines
1.6 KiB
JavaScript
Raw Permalink Normal View History

2019-02-06 17:04:46 +00:00
/* eslint-disable jsx-a11y/accessible-emoji */
2017-12-13 11:01:37 +00:00
/* @flow */
2019-04-25 11:08:13 +00:00
import * as React from 'react';
import { Header } from 'trezor-ui-components';
2019-02-24 23:32:00 +00:00
import { FormattedMessage } from 'react-intl';
2019-04-30 09:53:40 +00:00
import { Link } from 'react-router-dom';
2020-03-30 18:47:20 +00:00
import { toggleSidebar as toggleSidebarAction } from 'actions/WalletActions';
2019-02-24 23:32:00 +00:00
import l10nMessages from './index.messages';
2019-02-06 17:04:46 +00:00
import LanguagePicker from './components/LanguagePicker/Container';
2018-07-30 10:52:13 +00:00
2019-04-25 11:08:13 +00:00
type MyProps = {
sidebarEnabled?: boolean,
2019-02-25 00:43:34 +00:00
sidebarOpened?: ?boolean,
2020-03-30 18:47:20 +00:00
toggleSidebar?: typeof toggleSidebarAction,
2019-01-24 17:49:33 +00:00
};
2019-04-25 11:08:13 +00:00
const MyHeader = ({ sidebarEnabled, sidebarOpened, toggleSidebar }: MyProps) => (
<Header
sidebarEnabled={sidebarEnabled}
sidebarOpened={sidebarOpened}
toggleSidebar={toggleSidebar}
togglerOpenText={<FormattedMessage {...l10nMessages.TR_MENU} />}
togglerCloseText={<FormattedMessage {...l10nMessages.TR_MENU_CLOSE} />}
links={[
{
href: 'https://trezor.io/',
title: <FormattedMessage {...l10nMessages.TR_TREZOR} />,
},
{
href: 'https://wiki.trezor.io/',
title: <FormattedMessage {...l10nMessages.TR_WIKI} />,
},
{
href: 'https://blog.trezor.io/',
title: <FormattedMessage {...l10nMessages.TR_BLOG} />,
},
{
href: 'https://trezor.io/support/',
title: <FormattedMessage {...l10nMessages.TR_SUPPORT} />,
},
]}
2019-04-30 09:53:40 +00:00
logoLinkComponent={<Link to="/" />}
2019-04-25 11:08:13 +00:00
rightAddon={<LanguagePicker />}
/>
2018-07-30 10:52:13 +00:00
);
2018-03-08 16:10:53 +00:00
2019-04-25 11:08:13 +00:00
export default MyHeader;