Gaëtan Renaudeau
7 years ago
committed by
GitHub
11 changed files with 112 additions and 69 deletions
@ -0,0 +1,16 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React from 'react' |
||||
|
import { openURL } from 'helpers/linking' |
||||
|
|
||||
|
import Button from 'components/base/Button' |
||||
|
|
||||
|
export function ExternalLinkButton({ label, url, ...props }: { label: string, url: string }) { |
||||
|
return ( |
||||
|
<Button onClick={() => openURL(url)} {...props}> |
||||
|
{label} |
||||
|
</Button> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
export default ExternalLinkButton |
@ -0,0 +1,21 @@ |
|||||
|
// @flow
|
||||
|
|
||||
|
import React, { PureComponent } from 'react' |
||||
|
|
||||
|
import Button from 'components/base/Button' |
||||
|
import { translate } from 'react-i18next' |
||||
|
|
||||
|
import type { T } from 'types/common' |
||||
|
|
||||
|
type Props = { |
||||
|
t: T, |
||||
|
} |
||||
|
|
||||
|
class RetryButton extends PureComponent<Props> { |
||||
|
render() { |
||||
|
const { t, ...props } = this.props |
||||
|
return <Button {...props}>{t('app:common.retry')}</Button> |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
export default translate()(RetryButton) |
Loading…
Reference in new issue