mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Rework Button component to pass its label via children content
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { MouseEventHandler } from 'react';
|
||||
import { defineMessages, FormattedMessage as Message } from 'react-intl';
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
|
||||
import { connect } from 'app/functions';
|
||||
@@ -8,10 +8,6 @@ import copy from 'app/services/copy';
|
||||
|
||||
import styles from './finish.scss';
|
||||
|
||||
const messages = defineMessages({
|
||||
copy: 'Copy',
|
||||
});
|
||||
|
||||
interface Props {
|
||||
appName: string;
|
||||
code?: string;
|
||||
@@ -58,7 +54,9 @@ class Finish extends React.Component<Props> {
|
||||
<div className={styles.codeContainer}>
|
||||
<div className={styles.code}>{code}</div>
|
||||
</div>
|
||||
<Button color="green" small label={messages.copy} onClick={this.onCopyClick} />
|
||||
<Button color="green" small onClick={this.onCopyClick}>
|
||||
<Message key="copy" defaultMessage="Copy" />
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div className={styles.description}>
|
||||
|
Reference in New Issue
Block a user