Fix components baseline

This commit is contained in:
soupette 2019-12-09 17:33:50 +01:00
parent fdc5f069bf
commit d1d97e1751
8 changed files with 37 additions and 11 deletions

View File

@ -55,7 +55,7 @@ function List({
}; };
const addButtonProps = { const addButtonProps = {
icon: !isSub ? <Plus fill="#007eff" /> : false, icon: !isSub ? <Plus fill="#007eff" width="11px" height="11px" /> : false,
color: 'primary', color: 'primary',
label: formatMessage({ label: formatMessage({
id: !isSub id: !isSub

View File

@ -20,7 +20,7 @@ const WrapperSelect = ({ error, label, name, type, ...rest }) => {
: error : error
? '1px solid red !important' ? '1px solid red !important'
: '1px solid #E3E9F3 !important', : '1px solid #E3E9F3 !important',
'border-radius': '2px !important', borderRadius: '2px !important',
}), }),
menu: base => { menu: base => {
return { return {

View File

@ -433,8 +433,6 @@ const DataManagerProvider = ({ allIcons, children }) => {
}); });
}; };
console.log({ modifiedData });
return ( return (
<DataManagerContext.Provider <DataManagerContext.Provider
value={{ value={{

View File

@ -0,0 +1,13 @@
import styled from 'styled-components';
import { Button } from '@buffetjs/core';
const CustomButton = styled(Button)`
line-height: 30px;
svg {
height: 11px;
width: 11px;
vertical-align: middle;
}
`;
export default CustomButton;

View File

@ -28,6 +28,7 @@ import RelationForm from '../../components/RelationForm';
import HeaderNavLink from '../../components/HeaderNavLink'; import HeaderNavLink from '../../components/HeaderNavLink';
import WrapperSelect from '../../components/WrapperSelect'; import WrapperSelect from '../../components/WrapperSelect';
import getTrad from '../../utils/getTrad'; import getTrad from '../../utils/getTrad';
import makeSearch from '../../utils/makeSearch';
import getAttributes from './utils/attributes'; import getAttributes from './utils/attributes';
import forms from './utils/forms'; import forms from './utils/forms';
import { createComponentUid, createUid } from './utils/createUid'; import { createComponentUid, createUid } from './utils/createUid';
@ -36,7 +37,7 @@ import getNextSearch from './utils/getNextSearch';
import { NAVLINKS, INITIAL_STATE_DATA } from './utils/staticData'; import { NAVLINKS, INITIAL_STATE_DATA } from './utils/staticData';
import init from './init'; import init from './init';
import reducer, { initialState } from './reducer'; import reducer, { initialState } from './reducer';
import makeSearch from '../../utils/makeSearch'; import CustomButton from './CustomButton';
const FormModal = () => { const FormModal = () => {
const [state, setState] = useState(INITIAL_STATE_DATA); const [state, setState] = useState(INITIAL_STATE_DATA);
@ -1313,7 +1314,7 @@ const FormModal = () => {
{formatMessage({ id: getTrad('button.delete.title') })} {formatMessage({ id: getTrad('button.delete.title') })}
</Button> </Button>
)} )}
<Button <CustomButton
type={isCreating ? 'submit' : 'button'} type={isCreating ? 'submit' : 'button'}
color={ color={
(isCreatingContentType || (isCreatingContentType ||
@ -1329,11 +1330,12 @@ const FormModal = () => {
!isCreatingComponentFromAView && !isCreatingComponentFromAView &&
state.step !== '1') || state.step !== '1') ||
(state.modalType === 'addComponentToDynamicZone' && (state.modalType === 'addComponentToDynamicZone' &&
isCreatingComponentFromAView) isCreatingComponentFromAView) ||
(isCreatingComponentFromAView && state.step === '2')
} }
> >
{getButtonSubmitMessage()} {getButtonSubmitMessage()}
</Button> </CustomButton>
</div> </div>
</section> </section>
</ModalFooter> </ModalFooter>

View File

@ -445,7 +445,7 @@ const forms = {
? [[{ type: 'spacer' }]].concat( ? [[{ type: 'spacer' }]].concat(
componentForm.base('componentToCreate.') componentForm.base('componentToCreate.')
) )
: []; : [[{ type: 'spacer' }]];
return { return {
items: [[fields.createComponent], ...itemsToConcat], items: [[fields.createComponent], ...itemsToConcat],

View File

@ -11,6 +11,14 @@ const Wrapper = styled(ViewContainer)`
.button-submit { .button-submit {
min-width: 140px; min-width: 140px;
} }
.add-button {
line-height: 30px;
svg {
height: 11px;
width: 11px;
vertical-align: middle;
}
}
`; `;
export default Wrapper; export default Wrapper;

View File

@ -250,6 +250,7 @@ const ListPage = () => {
const addButtonProps = { const addButtonProps = {
icon: true, icon: true,
className: 'add-button',
color: 'primary', color: 'primary',
label: formatMessage({ id: `${pluginId}.button.attributes.add.another` }), label: formatMessage({ id: `${pluginId}.button.attributes.add.another` }),
onClick: () => { onClick: () => {
@ -268,7 +269,7 @@ const ListPage = () => {
color: 'secondary', color: 'secondary',
label: formatMessage({ id: `${pluginId}.form.button.configure-view` }), label: formatMessage({ id: `${pluginId}.form.button.configure-view` }),
onClick: goToCMSettingsPage, onClick: goToCMSettingsPage,
style: { height: '30px' }, style: { height: '30px', marginTop: '1px' },
className: 'button-secondary', className: 'button-secondary',
}; };
@ -320,7 +321,11 @@ const ListPage = () => {
<Header {...headerProps} /> <Header {...headerProps} />
<ListWrapper> <ListWrapper>
<ListHeader actions={listActions} title={listTitle} /> <ListHeader
actions={listActions}
title={listTitle}
// style={{ top: 1 }}
/>
<List <List
items={convertAttrObjToArray(attributes)} items={convertAttrObjToArray(attributes)}
customRowComponent={props => <CustomRow {...props} />} customRowComponent={props => <CustomRow {...props} />}