Merge pull request #1660 from lbryio/links
External-internal links (UX/UI)
This commit is contained in:
commit
0bbabc5461
2 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
// @flow
|
||||
import * as React from 'react';
|
||||
import { MODALS, isURIValid } from 'lbry-redux';
|
||||
import * as icons from 'constants/icons';
|
||||
import Button from 'component/button';
|
||||
|
||||
type Props = {
|
||||
|
@ -32,12 +33,12 @@ class ExternalLink extends React.PureComponent<Props> {
|
|||
element = (
|
||||
<Button
|
||||
button="link"
|
||||
iconRight={icons.EXTERNAL_LINK}
|
||||
title={title || href}
|
||||
label={children}
|
||||
className="btn--external-link"
|
||||
onClick={() => openModal({ id: MODALS.CONFIRM_EXTERNAL_LINK }, { uri: href })}
|
||||
>
|
||||
{children}
|
||||
</Button>
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -47,10 +48,9 @@ class ExternalLink extends React.PureComponent<Props> {
|
|||
<Button
|
||||
button="link"
|
||||
title={title || href}
|
||||
label={children}
|
||||
onClick={() => navigate('/show', { uri: href })}
|
||||
>
|
||||
{children}
|
||||
</Button>
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,3 +26,4 @@ export const HEART = 'Heart';
|
|||
export const UNLOCK = 'Unlock';
|
||||
export const CHECK_SIMPLE = 'Check';
|
||||
export const GLOBE = 'Globe';
|
||||
export const EXTERNAL_LINK = 'ExternalLink';
|
||||
|
|
Loading…
Reference in a new issue