lbry-desktop/ui/component/common/help-link.jsx

33 lines
705 B
React
Raw Normal View History

2019-10-03 23:40:54 +02:00
// @flow
import * as ICONS from 'constants/icons';
import React from 'react';
import Button from 'component/button';
type Props = {
2020-02-21 18:23:04 +01:00
href?: string,
navigate?: string,
icon?: string,
iconSize?: number,
description?: string,
2019-10-03 23:40:54 +02:00
};
export default function HelpLink(props: Props) {
const { href, navigate, icon, iconSize, description } = props;
return (
<Button
onClick={(e) => {
2020-10-12 23:32:46 +02:00
if (href) {
e.stopPropagation();
}
}}
className="icon--help"
icon={icon || ICONS.HELP}
iconSize={iconSize || 14}
title={description || __('Help')}
description={description || __('Help')}
href={href}
navigate={navigate}
/>
);
2019-10-03 23:40:54 +02:00
}