mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 09:45:10 +00:00
add icons for external-links
This commit is contained in:
parent
1e95072722
commit
3a81c25dab
2 changed files with 9 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { MODALS, isURIValid } from 'lbry-redux';
|
import { MODALS, isURIValid } from 'lbry-redux';
|
||||||
|
import * as icons from 'constants/icons';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -32,12 +33,12 @@ class ExternalLink extends React.PureComponent<Props> {
|
||||||
element = (
|
element = (
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
|
icon={icons.EXTERNAL_LINK}
|
||||||
title={title || href}
|
title={title || href}
|
||||||
|
label={children}
|
||||||
className="btn--external-link"
|
className="btn--external-link"
|
||||||
onClick={() => openModal({ id: MODALS.CONFIRM_EXTERNAL_LINK }, { uri: href })}
|
onClick={() => openModal({ id: MODALS.CONFIRM_EXTERNAL_LINK }, { uri: href })}
|
||||||
>
|
/>
|
||||||
{children}
|
|
||||||
</Button>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,10 +48,10 @@ class ExternalLink extends React.PureComponent<Props> {
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
title={title || href}
|
title={title || href}
|
||||||
|
icon={icons.LINK}
|
||||||
|
label={children}
|
||||||
onClick={() => navigate('/show', { uri: href })}
|
onClick={() => navigate('/show', { uri: href })}
|
||||||
>
|
/>
|
||||||
{children}
|
|
||||||
</Button>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,3 +26,5 @@ export const HEART = 'Heart';
|
||||||
export const UNLOCK = 'Unlock';
|
export const UNLOCK = 'Unlock';
|
||||||
export const CHECK_SIMPLE = 'Check';
|
export const CHECK_SIMPLE = 'Check';
|
||||||
export const GLOBE = 'Globe';
|
export const GLOBE = 'Globe';
|
||||||
|
export const LINK = 'Link';
|
||||||
|
export const EXTERNAL_LINK = 'ExternalLink';
|
||||||
|
|
Loading…
Add table
Reference in a new issue