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,15 +1,11 @@
|
||||
import React from 'react';
|
||||
import { defineMessages, FormattedMessage as Message } from 'react-intl';
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
import { Helmet } from 'react-helmet-async';
|
||||
import { Input, Button, Form, FormModel } from 'app/components/ui/form';
|
||||
import { BackButton } from 'app/components/profile/ProfileForm';
|
||||
|
||||
import styles from '../profileForm.scss';
|
||||
|
||||
const labels = defineMessages({
|
||||
changeUsernameButton: 'Change nickname',
|
||||
});
|
||||
|
||||
interface Props {
|
||||
username: string;
|
||||
form: FormModel;
|
||||
@@ -72,7 +68,9 @@ export default class ChangeUsername extends React.Component<Props> {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button color="green" block label={labels.changeUsernameButton} type="submit" />
|
||||
<Button color="green" block type="submit">
|
||||
<Message key="changeUsernameButton" defaultMessage="Change nickname" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
|
Reference in New Issue
Block a user