mirror of
https://github.com/strapi/strapi.git
synced 2025-11-26 15:11:24 +00:00
feedback fix
This commit is contained in:
parent
5365cde4c5
commit
3d53acddee
@ -1,5 +1,6 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import styled from 'styled-components';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import { Checkbox } from '@strapi/design-system/Checkbox';
|
import { Checkbox } from '@strapi/design-system/Checkbox';
|
||||||
import { Dialog, DialogBody, DialogFooter } from '@strapi/design-system/Dialog';
|
import { Dialog, DialogBody, DialogFooter } from '@strapi/design-system/Dialog';
|
||||||
@ -10,6 +11,10 @@ import { Button } from '@strapi/design-system/Button';
|
|||||||
import ExclamationMarkCircle from '@strapi/icons/ExclamationMarkCircle';
|
import ExclamationMarkCircle from '@strapi/icons/ExclamationMarkCircle';
|
||||||
import { getTrad } from '../../utils';
|
import { getTrad } from '../../utils';
|
||||||
|
|
||||||
|
const TextAlignTypography = styled(Typography)`
|
||||||
|
text-align: center;
|
||||||
|
`;
|
||||||
|
|
||||||
const CheckboxConfirmation = ({ description, isCreating, intlLabel, name, onChange, value }) => {
|
const CheckboxConfirmation = ({ description, isCreating, intlLabel, name, onChange, value }) => {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
@ -63,17 +68,17 @@ const CheckboxConfirmation = ({ description, isCreating, intlLabel, name, onChan
|
|||||||
<Dialog onClose={handleToggle} title="Confirmation" isOpen={isOpen}>
|
<Dialog onClose={handleToggle} title="Confirmation" isOpen={isOpen}>
|
||||||
<DialogBody icon={<ExclamationMarkCircle />}>
|
<DialogBody icon={<ExclamationMarkCircle />}>
|
||||||
<Stack size={2}>
|
<Stack size={2}>
|
||||||
<Flex justifyContent="center" style={{ textAlign: 'center' }}>
|
<Flex justifyContent="center">
|
||||||
<Typography id="confirm-description">
|
<TextAlignTypography id="confirm-description">
|
||||||
{formatMessage({
|
{formatMessage({
|
||||||
id: getTrad('CheckboxConfirmation.Modal.content'),
|
id: getTrad('CheckboxConfirmation.Modal.content'),
|
||||||
defaultMessage:
|
defaultMessage:
|
||||||
'Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).',
|
'Disabling localization will engender the deletion of all your content but the one associated to your default locale (if existing).',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</TextAlignTypography>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex justifyContent="center" style={{ textAlign: 'center' }}>
|
<Flex justifyContent="center">
|
||||||
<Typography id="confirm-description" bold>
|
<Typography fontWeight="semiBold" id="confirm-description">
|
||||||
{formatMessage({
|
{formatMessage({
|
||||||
id: getTrad('CheckboxConfirmation.Modal.body'),
|
id: getTrad('CheckboxConfirmation.Modal.body'),
|
||||||
defaultMessage: 'Do you want to disable it?',
|
defaultMessage: 'Do you want to disable it?',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user