mirror of
https://github.com/strapi/strapi.git
synced 2025-09-20 14:00:48 +00:00
Merge pull request #14929 from strapi/fix/configure-the-view-cm-break
CM: Fix ToggleInput wrapping for configure the view
This commit is contained in:
commit
9ea56017f2
@ -1,34 +1,29 @@
|
|||||||
import React from 'react';
|
import React 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 { Flex } from '@strapi/design-system/Flex';
|
import { Box } from '@strapi/design-system/Box';
|
||||||
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
||||||
import { Select, Option } from '@strapi/design-system/Select';
|
import { Select, Option } from '@strapi/design-system/Select';
|
||||||
import { ToggleInput } from '@strapi/design-system/ToggleInput';
|
import { ToggleInput } from '@strapi/design-system/ToggleInput';
|
||||||
import { Box } from '@strapi/design-system/Box';
|
import { Stack } from '@strapi/design-system/Stack';
|
||||||
import { Typography } from '@strapi/design-system/Typography';
|
import { Typography } from '@strapi/design-system/Typography';
|
||||||
import { getTrad } from '../../../utils';
|
import { getTrad } from '../../../utils';
|
||||||
|
|
||||||
const FlexGap = styled(Flex)`
|
|
||||||
gap: ${({ theme }) => theme.spaces[4]};
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Settings = ({ modifiedData, onChange, sortOptions }) => {
|
const Settings = ({ modifiedData, onChange, sortOptions }) => {
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const { settings, metadatas } = modifiedData;
|
const { settings, metadatas } = modifiedData;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Stack spacing={4}>
|
||||||
<Box paddingBottom={4}>
|
|
||||||
<Typography variant="delta" as="h2">
|
<Typography variant="delta" as="h2">
|
||||||
{formatMessage({
|
{formatMessage({
|
||||||
id: getTrad('containers.SettingPage.settings'),
|
id: getTrad('containers.SettingPage.settings'),
|
||||||
defaultMessage: 'Settings',
|
defaultMessage: 'Settings',
|
||||||
})}
|
})}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
|
||||||
<FlexGap justifyContent="space-between" wrap="wrap" paddingBottom={6}>
|
<Stack horizontal justifyContent="space-between" spacing={4}>
|
||||||
|
<Box width="100%">
|
||||||
<ToggleInput
|
<ToggleInput
|
||||||
label={formatMessage({
|
label={formatMessage({
|
||||||
id: getTrad('form.Input.search'),
|
id: getTrad('form.Input.search'),
|
||||||
@ -48,6 +43,9 @@ const Settings = ({ modifiedData, onChange, sortOptions }) => {
|
|||||||
name="settings.searchable"
|
name="settings.searchable"
|
||||||
checked={settings.searchable}
|
checked={settings.searchable}
|
||||||
/>
|
/>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<Box width="100%">
|
||||||
<ToggleInput
|
<ToggleInput
|
||||||
label={formatMessage({
|
label={formatMessage({
|
||||||
id: getTrad('form.Input.filters'),
|
id: getTrad('form.Input.filters'),
|
||||||
@ -67,6 +65,9 @@ const Settings = ({ modifiedData, onChange, sortOptions }) => {
|
|||||||
name="settings.filterable"
|
name="settings.filterable"
|
||||||
checked={settings.filterable}
|
checked={settings.filterable}
|
||||||
/>
|
/>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<Box width="100%">
|
||||||
<ToggleInput
|
<ToggleInput
|
||||||
label={formatMessage({
|
label={formatMessage({
|
||||||
id: getTrad('form.Input.bulkActions'),
|
id: getTrad('form.Input.bulkActions'),
|
||||||
@ -86,7 +87,9 @@ const Settings = ({ modifiedData, onChange, sortOptions }) => {
|
|||||||
name="settings.bulkable"
|
name="settings.bulkable"
|
||||||
checked={settings.bulkable}
|
checked={settings.bulkable}
|
||||||
/>
|
/>
|
||||||
</FlexGap>
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
<Grid gap={4}>
|
<Grid gap={4}>
|
||||||
<GridItem s={12} col={6}>
|
<GridItem s={12} col={6}>
|
||||||
<Select
|
<Select
|
||||||
@ -145,7 +148,7 @@ const Settings = ({ modifiedData, onChange, sortOptions }) => {
|
|||||||
</Select>
|
</Select>
|
||||||
</GridItem>
|
</GridItem>
|
||||||
</Grid>
|
</Grid>
|
||||||
</>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user