mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 22:23:10 +00:00
Fix PR feedback
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
72240c973d
commit
719e4693ea
@ -1,18 +1,17 @@
|
||||
import React from 'react';
|
||||
import { Flex, Padded, Text } from '@buffetjs/core';
|
||||
import { LoadingIndicator, Row } from 'strapi-helper-plugin';
|
||||
import { BaselineAlignment, LoadingIndicator, Row } from 'strapi-helper-plugin';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignement from '../BaselineAlignement';
|
||||
import Bloc from '../Bloc';
|
||||
|
||||
const FormBloc = ({ children, actions, isLoading, title, subtitle }) => (
|
||||
<Bloc>
|
||||
<BaselineAlignement top size={title ? '18px' : '22px'} />
|
||||
<BaselineAlignment top size={title ? '18px' : '22px'} />
|
||||
<Padded left right size="sm">
|
||||
{isLoading ? (
|
||||
<>
|
||||
<LoadingIndicator />
|
||||
<BaselineAlignement bottom size="22px" />
|
||||
<BaselineAlignment bottom size="22px" />
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@ -33,7 +32,7 @@ const FormBloc = ({ children, actions, isLoading, title, subtitle }) => (
|
||||
{actions}
|
||||
</Flex>
|
||||
</Padded>
|
||||
<BaselineAlignement top size="18px" />
|
||||
<BaselineAlignment top size="18px" />
|
||||
</>
|
||||
)}
|
||||
<Row>{children}</Row>
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
import React from 'react';
|
||||
import { Flex, Padded, Text } from '@buffetjs/core';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { useQuery } from 'strapi-helper-plugin';
|
||||
import BaselineAlignement from '../../BaselineAlignement';
|
||||
import { BaselineAlignment, useQuery } from 'strapi-helper-plugin';
|
||||
|
||||
const EmptyRole = () => {
|
||||
const { formatMessage } = useIntl();
|
||||
@ -11,7 +10,7 @@ const EmptyRole = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<BaselineAlignement top size="2px" />
|
||||
<BaselineAlignment top size="2px" />
|
||||
<Padded top bottom size="md">
|
||||
<Flex justifyContent="center">
|
||||
<Text fontSize="lg" fontWeight="bold">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import React, { forwardRef, useReducer, useImperativeHandle, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ModalSection, request } from 'strapi-helper-plugin';
|
||||
import { BaselineAlignment, ModalSection, request } from 'strapi-helper-plugin';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { get } from 'lodash';
|
||||
import { Padded, Text } from '@buffetjs/core';
|
||||
@ -14,7 +14,6 @@ import init from './init';
|
||||
import Input from '../../SizedInput';
|
||||
import Wrapper from './Wrapper';
|
||||
import MagicLink from '../MagicLink';
|
||||
import BaselineAlignment from '../../BaselineAlignement';
|
||||
|
||||
// This component accepts a ref so we can have access to the submit handler.
|
||||
const ModalCreateBody = forwardRef(
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignement from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import LinkText, { LinkArrow } from './components';
|
||||
|
||||
const Link = ({ href, label }) => {
|
||||
return (
|
||||
<Padded top size="smd">
|
||||
<BaselineAlignement top size="1px" />
|
||||
<BaselineAlignment top size="1px" />
|
||||
<LinkText fontWeight="semiBold">
|
||||
<a href={href} target="_blank" rel="noopener noreferrer">
|
||||
{label}
|
||||
|
||||
@ -4,7 +4,7 @@ import { Flex, Padded, Text } from '@buffetjs/core';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import { useIntl } from 'react-intl';
|
||||
import BaselineAlignement from '../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import Bloc from '../../components/Bloc';
|
||||
import PageTitle from '../../components/SettingsPageTitle';
|
||||
import makeSelectApp from '../App/selectors';
|
||||
@ -53,7 +53,7 @@ const ApplicationInfosPage = () => {
|
||||
<div>
|
||||
<PageTitle name="Infos" />
|
||||
<Header {...headerProps} />
|
||||
<BaselineAlignement top size="3px" />
|
||||
<BaselineAlignment top size="3px" />
|
||||
<Bloc>
|
||||
<Padded left right top size="smd">
|
||||
<Padded left right top size="xs">
|
||||
@ -77,7 +77,7 @@ const ApplicationInfosPage = () => {
|
||||
</Padded>
|
||||
</Padded>
|
||||
</Padded>
|
||||
<BaselineAlignement top size="60px" />
|
||||
<BaselineAlignment top size="60px" />
|
||||
</Bloc>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Text } from '@buffetjs/core';
|
||||
import { useIntl } from 'react-intl';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignment from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import Section from '../Section';
|
||||
import Link from './Link';
|
||||
import Wrapper from './Wrapper';
|
||||
|
||||
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignment from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import Button from '../../../../components/FullWidthButton';
|
||||
import AuthLink from '../AuthLink';
|
||||
import Input from '../Input';
|
||||
|
||||
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Padded, Text } from '@buffetjs/core';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import BaselineAlignment from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import Button from '../../../../components/FullWidthButton';
|
||||
import Box from '../Box';
|
||||
import Logo from '../Logo';
|
||||
|
||||
@ -3,7 +3,7 @@ import { Checkbox } from '@buffetjs/core';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { get } from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignment from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import Button from '../../../../components/FullWidthButton';
|
||||
import AuthLink from '../AuthLink';
|
||||
import Box from '../Box';
|
||||
|
||||
@ -2,8 +2,7 @@ import React from 'react';
|
||||
import { Text, Padded } from '@buffetjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { useQuery } from 'strapi-helper-plugin';
|
||||
import BaselineAlignment from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment, useQuery } from 'strapi-helper-plugin';
|
||||
import Button from '../../../../components/FullWidthButton';
|
||||
import OopsLogo from '../../../../assets/images/oops.png';
|
||||
import Box from '../Box';
|
||||
|
||||
@ -3,7 +3,7 @@ import { useIntl } from 'react-intl';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
import { get } from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignment from '../../../../components/BaselineAlignement';
|
||||
import { BaselineAlignment } from 'strapi-helper-plugin';
|
||||
import Button from '../../../../components/FullWidthButton';
|
||||
import AuthLink from '../AuthLink';
|
||||
import Input from '../Input';
|
||||
|
||||
@ -2,10 +2,9 @@ import React, { useEffect, useReducer } from 'react';
|
||||
import axios from 'axios';
|
||||
import { camelCase, get, omit, upperFirst } from 'lodash';
|
||||
import { Redirect, useRouteMatch, useHistory } from 'react-router-dom';
|
||||
import { auth, useQuery } from 'strapi-helper-plugin';
|
||||
import { BaselineAlignment, auth, useQuery } from 'strapi-helper-plugin';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignment from '../../components/BaselineAlignement';
|
||||
import NavTopRightWrapper from '../../components/NavTopRightWrapper';
|
||||
import PageTitle from '../../components/PageTitle';
|
||||
import LocaleToggle from '../LocaleToggle';
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
import React from 'react';
|
||||
import { BackHeader, auth } from 'strapi-helper-plugin';
|
||||
import { BackHeader, BaselineAlignment, auth } from 'strapi-helper-plugin';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { get } from 'lodash';
|
||||
|
||||
import BaselineAlignement from '../../components/BaselineAlignement';
|
||||
import ContainerFluid from '../../components/ContainerFluid';
|
||||
import FormBloc from '../../components/FormBloc';
|
||||
import SizedInput from '../../components/SizedInput';
|
||||
@ -42,7 +40,7 @@ const ProfilePage = () => {
|
||||
onCancel={handleCancel}
|
||||
showHeaderButtonLoader={showHeaderButtonLoader}
|
||||
/>
|
||||
<BaselineAlignement top size="3px" />
|
||||
<BaselineAlignment top size="3px" />
|
||||
<FormBloc isLoading={isLoading}>
|
||||
{Object.keys(form).map(key => {
|
||||
return (
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import React, { useState, useRef } from 'react';
|
||||
import { useRouteMatch } from 'react-router-dom';
|
||||
import { get, has, isEmpty } from 'lodash';
|
||||
import { useGlobalContext, request, difference } from 'strapi-helper-plugin';
|
||||
import { BaselineAlignment, useGlobalContext, request, difference } from 'strapi-helper-plugin';
|
||||
import { Header } from '@buffetjs/custom';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
import { Formik } from 'formik';
|
||||
import { useIntl } from 'react-intl';
|
||||
import BaselineAlignement from '../../../components/BaselineAlignement';
|
||||
import PageTitle from '../../../components/SettingsPageTitle';
|
||||
import ContainerFluid from '../../../components/ContainerFluid';
|
||||
import { Permissions, RoleForm } from '../../../components/Roles';
|
||||
@ -154,7 +153,7 @@ const EditPage = () => {
|
||||
actions={headerActions(handleSubmit, handleReset)}
|
||||
isLoading={isLayoutLoading || isRoleLoading}
|
||||
/>
|
||||
<BaselineAlignement top size="3px" />
|
||||
<BaselineAlignment top size="3px" />
|
||||
<RoleForm
|
||||
isLoading={isRoleLoading}
|
||||
disabled={role.code === 'strapi-super-admin'}
|
||||
|
||||
@ -2,11 +2,10 @@ import React from 'react';
|
||||
import { useRouteMatch } from 'react-router-dom';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { get, isEmpty } from 'lodash';
|
||||
import { useGlobalContext, auth } from 'strapi-helper-plugin';
|
||||
import { BaselineAlignment, useGlobalContext, auth } from 'strapi-helper-plugin';
|
||||
import { Col } from 'reactstrap';
|
||||
import { Padded } from '@buffetjs/core';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaselineAlignement from '../../../components/BaselineAlignement';
|
||||
import PageTitle from '../../../components/SettingsPageTitle';
|
||||
import ContainerFluid from '../../../components/ContainerFluid';
|
||||
import FormBloc from '../../../components/FormBloc';
|
||||
@ -74,10 +73,10 @@ const EditPage = ({ canUpdate }) => {
|
||||
<Padded top bottom size="sm">
|
||||
<MagicLink registrationToken={initialData.registrationToken} />
|
||||
</Padded>
|
||||
<BaselineAlignement top size="1px" />
|
||||
<BaselineAlignment top size="1px" />
|
||||
</>
|
||||
) : (
|
||||
<BaselineAlignement top size="3px" />
|
||||
<BaselineAlignment top size="3px" />
|
||||
)}
|
||||
|
||||
<FormBloc
|
||||
@ -100,7 +99,7 @@ const EditPage = ({ canUpdate }) => {
|
||||
);
|
||||
})}
|
||||
</FormBloc>
|
||||
<BaselineAlignement top size="2px" />
|
||||
<BaselineAlignment top size="2px" />
|
||||
<Padded top size="md">
|
||||
{!isLoading && (
|
||||
<FormBloc
|
||||
@ -115,7 +114,7 @@ const EditPage = ({ canUpdate }) => {
|
||||
error={formErrors.roles}
|
||||
value={get(modifiedData, 'roles', [])}
|
||||
/>
|
||||
<BaselineAlignement top size={hasRolesError ? '0' : '17px'} />
|
||||
<BaselineAlignment top size={hasRolesError ? '0' : '17px'} />
|
||||
</Padded>
|
||||
</Col>
|
||||
</FormBloc>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react';
|
||||
import {
|
||||
BaselineAlignment,
|
||||
useQuery,
|
||||
request,
|
||||
useUserPermissions,
|
||||
@ -9,7 +10,6 @@ import {
|
||||
import { get } from 'lodash';
|
||||
import { useHistory, useLocation } from 'react-router-dom';
|
||||
import { Flex, Padded } from '@buffetjs/core';
|
||||
import BaselineAlignement from '../../../components/BaselineAlignement';
|
||||
import PageTitle from '../../../components/SettingsPageTitle';
|
||||
import { useSettingsHeaderSearchContext } from '../../../hooks';
|
||||
import { Footer, List, Filter, FilterPicker, SortPicker } from '../../../components/Users';
|
||||
@ -238,21 +238,21 @@ const ListPage = () => {
|
||||
/>
|
||||
{canRead && (
|
||||
<>
|
||||
<BaselineAlignement top size="1px">
|
||||
<BaselineAlignment top size="1px">
|
||||
<Flex flexWrap="wrap">
|
||||
<SortPicker onChange={handleChangeSort} value={_sort} />
|
||||
<Padded right size="10px" />
|
||||
<BaselineAlignement bottom size="6px">
|
||||
<BaselineAlignment bottom size="6px">
|
||||
<FilterPicker onChange={handleChangeFilter} />
|
||||
</BaselineAlignement>
|
||||
</BaselineAlignment>
|
||||
<Padded right size="10px" />
|
||||
{filters.map((filter, i) => (
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
<Filter key={i} {...filter} onClick={handleClickDeleteFilter} />
|
||||
))}
|
||||
</Flex>
|
||||
</BaselineAlignement>
|
||||
<BaselineAlignement top size="8px" />
|
||||
</BaselineAlignment>
|
||||
<BaselineAlignment top size="8px" />
|
||||
<Padded top size="sm">
|
||||
<List
|
||||
canDelete={canDelete}
|
||||
|
||||
@ -27,6 +27,7 @@ const colors = {
|
||||
lightBlue: '#E6F0FB',
|
||||
mediumBlue: '#007eff',
|
||||
darkBlue: '#AED4FB',
|
||||
pale: '#f7f8f8',
|
||||
content: {
|
||||
background: '#fafafb',
|
||||
'background-alpha': 'rgba(14, 22, 34, 0.02)',
|
||||
|
||||
@ -5,11 +5,15 @@ import moment from 'moment';
|
||||
import { Formik } from 'formik';
|
||||
import { get, isEmpty } from 'lodash';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { CheckPagePermissions, request, useGlobalContext } from 'strapi-helper-plugin';
|
||||
import {
|
||||
BaselineAlignment,
|
||||
CheckPagePermissions,
|
||||
request,
|
||||
useGlobalContext,
|
||||
} from 'strapi-helper-plugin';
|
||||
import { useHistory, useRouteMatch } from 'react-router-dom';
|
||||
import adminPermissions from '../../../../../admin/src/permissions';
|
||||
import { useFetchPermissionsLayout, useFetchRole } from '../../../../../admin/src/hooks';
|
||||
import BaselineAlignement from '../../../../../admin/src/components/BaselineAlignement';
|
||||
import PageTitle from '../../../../../admin/src/components/SettingsPageTitle';
|
||||
import ContainerFluid from '../../../../../admin/src/components/ContainerFluid';
|
||||
import FormCard from '../../../../../admin/src/components/FormBloc';
|
||||
@ -146,7 +150,7 @@ const CreatePage = () => {
|
||||
actions={headerActions(handleSubmit, handleReset)}
|
||||
isLoading={isLayoutLoading}
|
||||
/>
|
||||
<BaselineAlignement top size="3px" />
|
||||
<BaselineAlignment top size="3px" />
|
||||
<FormCard
|
||||
actions={actions}
|
||||
title={formatMessage({
|
||||
|
||||
@ -7,7 +7,7 @@ export { default as routerPropTypes } from './commonPropTypes/router';
|
||||
export { default as themePropTypes } from './commonPropTypes/themeShape';
|
||||
// Components
|
||||
export { default as BackHeader } from './components/BackHeader';
|
||||
export { default as BaselineAlignement } from './components/BaselineAlignement';
|
||||
export { default as BaselineAlignment } from './components/BaselineAlignment';
|
||||
export { default as BlockerComponent } from './components/BlockerComponent';
|
||||
export { default as Button } from './components/Button';
|
||||
export { default as ButtonModal } from './components/ButtonModal';
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import React, { Fragment, memo, useCallback, useMemo } from 'react';
|
||||
import React, { memo, useCallback, useMemo } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { get } from 'lodash';
|
||||
import {
|
||||
BackHeader,
|
||||
BaselineAlignement,
|
||||
BaselineAlignment,
|
||||
LiLink,
|
||||
LoadingIndicatorPage,
|
||||
CheckPermissions,
|
||||
@ -143,14 +143,13 @@ const EditView = ({ isSingleType, goBack, layout, slug, state, id, origin }) =>
|
||||
const baselineAlignementSize = blockIndex === 0 ? '3px' : '0';
|
||||
|
||||
return (
|
||||
<Fragment key={blockIndex}>
|
||||
<BaselineAlignement top size={baselineAlignementSize} />
|
||||
<BaselineAlignment key={blockIndex} top size={baselineAlignementSize}>
|
||||
<DynamicZone
|
||||
name={name}
|
||||
fieldSchema={fieldSchema}
|
||||
metadatas={metadatas}
|
||||
/>
|
||||
</Fragment>
|
||||
</BaselineAlignment>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ import styled from 'styled-components';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid rgb(247, 248, 248);
|
||||
border-bottom: 1px solid ${({ theme }) => theme.main.colors.pale};
|
||||
`;
|
||||
|
||||
export default Wrapper;
|
||||
|
||||
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { Flex, Padded, Text } from '@buffetjs/core';
|
||||
import { BaselineAlignement, useGlobalContext } from 'strapi-helper-plugin';
|
||||
import { BaselineAlignment, useGlobalContext } from 'strapi-helper-plugin';
|
||||
import { getTrad } from '../../../../utils';
|
||||
import Reset from './Reset';
|
||||
|
||||
@ -17,7 +17,7 @@ const Header = ({ onClick, onToggle }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<BaselineAlignement top size="19px">
|
||||
<BaselineAlignment top size="19px">
|
||||
<Padded left right size="xs">
|
||||
<Padded left right size="sm">
|
||||
<Flex justifyContent="space-between">
|
||||
@ -30,7 +30,7 @@ const Header = ({ onClick, onToggle }) => {
|
||||
</Flex>
|
||||
</Padded>
|
||||
</Padded>
|
||||
</BaselineAlignement>
|
||||
</BaselineAlignment>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -428,13 +428,6 @@ function ListView({
|
||||
onClickReset={onResetListHeaders}
|
||||
slug={slug}
|
||||
/>
|
||||
{/* <DisplayedFieldsDropdown
|
||||
displayedHeaders={displayedHeaders}
|
||||
items={allAllowedHeaders}
|
||||
onChange={handleChangeListLabels}
|
||||
onClickReset={onResetListHeaders}
|
||||
slug={slug}
|
||||
/> */}
|
||||
</CheckPermissions>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user