UI Tweaks and bug fixes

This commit is contained in:
Daniel Lautzenheiser 2022-09-22 18:09:57 -04:00
parent 613a1cec76
commit 1aeffbf9c4
83 changed files with 171 additions and 113 deletions

View File

@ -44,7 +44,6 @@ module.exports = {
'@emotion/styled-import': 'error', '@emotion/styled-import': 'error',
'require-atomic-updates': [0], 'require-atomic-updates': [0],
'object-shorthand': ['error', 'always'], 'object-shorthand': ['error', 'always'],
'func-style': ['error', 'declaration'],
'prefer-const': [ 'prefer-const': [
'error', 'error',
{ {

View File

@ -70,6 +70,8 @@ collections: # A list of collections the CMS should be able to edit
label: 'Site Settings' label: 'Site Settings'
file: '_data/settings.json' file: '_data/settings.json'
description: 'General Site Settings' description: 'General Site Settings'
editor:
preview: true
fields: fields:
- { label: 'Global title', name: 'site_title', widget: 'string' } - { label: 'Global title', name: 'site_title', widget: 'string' }
- label: 'Post Settings' - label: 'Post Settings'

View File

@ -71,6 +71,8 @@ collections: # A list of collections the CMS should be able to edit
label: 'Site Settings' label: 'Site Settings'
file: '_data/settings.json' file: '_data/settings.json'
description: 'General Site Settings' description: 'General Site Settings'
editor:
preview: true
fields: fields:
- { label: 'Global title', name: 'site_title', widget: 'string' } - { label: 'Global title', name: 'site_title', widget: 'string' }
- label: 'Post Settings' - label: 'Post Settings'

View File

@ -27,7 +27,7 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"codemirror": "^5.46.0", "codemirror": "^5.46.0",
"immutable": "^3.7.6", "immutable": "^3.7.6",

View File

@ -25,7 +25,7 @@
"semaphore": "^1.1.0" "semaphore": "^1.1.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -26,7 +26,7 @@
"what-the-diff": "^0.6.0" "what-the-diff": "^0.6.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -27,7 +27,7 @@
"minimatch": "^3.0.4" "minimatch": "^3.0.4"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"netlify-cms-backend-bitbucket": "^2.12.8", "netlify-cms-backend-bitbucket": "^2.12.8",

View File

@ -32,7 +32,7 @@
"semaphore": "^1.1.0" "semaphore": "^1.1.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"netlify-cms-lib-auth": "^2.3.0", "netlify-cms-lib-auth": "^2.3.0",

View File

@ -28,7 +28,7 @@
"semaphore": "^1.1.0" "semaphore": "^1.1.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -19,7 +19,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\"" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\""
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"netlify-cms-lib-util": "^2.12.3", "netlify-cms-lib-util": "^2.12.3",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",

View File

@ -19,7 +19,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\"" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\""
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"netlify-cms-lib-util": "^2.12.3", "netlify-cms-lib-util": "^2.12.3",

View File

@ -281,6 +281,9 @@ declare module 'netlify-cms-core' {
i18n?: boolean | CmsI18nConfig; i18n?: boolean | CmsI18nConfig;
media_folder?: string; media_folder?: string;
public_folder?: string; public_folder?: string;
editor?: {
preview?: boolean;
};
} }
export interface ViewFilter { export interface ViewFilter {

View File

@ -76,7 +76,7 @@
"yaml": "^1.8.3" "yaml": "^1.8.3"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -37,8 +37,9 @@ TopBarProgress.config({
const AppRoot = styled.div` const AppRoot = styled.div`
width: 100%; width: 100%;
min-width: 1200px; min-width: 1200px;
min-height: 100vh; height: 100vh;
position: relative; position: relative;
overflow: hidden;
`; `;
const AppWrapper = styled.div` const AppWrapper = styled.div`

View File

@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { import {

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { buttons, StyledDropdownButton, colors } from 'netlify-cms-ui-default'; import { buttons, StyledDropdownButton, colors } from 'netlify-cms-ui-default';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { List } from 'immutable'; import { List } from 'immutable';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { NavLink } from 'react-router-dom'; import { NavLink } from 'react-router-dom';
import { Icon, components, colors } from 'netlify-cms-ui-default'; import { Icon, components, colors } from 'netlify-cms-ui-default';

View File

@ -3,7 +3,7 @@ import { bindActionCreators } from 'redux';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { ClassNames, Global, css as coreCss } from '@emotion/core'; import { ClassNames, Global, css as coreCss } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { partial, uniqueId } from 'lodash'; import { partial, uniqueId } from 'lodash';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
@ -77,10 +77,6 @@ const styleStrings = {
const ControlContainer = styled.div` const ControlContainer = styled.div`
margin-top: 16px; margin-top: 16px;
&:first-of-type {
margin-top: 36px;
}
`; `;
const ControlErrorsList = styled.ul` const ControlErrorsList = styled.ul`

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { import {
buttons, buttons,

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { css, Global } from '@emotion/core'; import { css, Global } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { import {
colors, colors,
@ -118,9 +118,9 @@ const ControlPaneContainer = styled(PreviewPaneContainer)`
`; `;
const ViewControls = styled.div` const ViewControls = styled.div`
position: absolute; position: fixed;
top: 10px; bottom: 3px;
right: 28px; right: 12px;
z-index: ${zIndex.zIndex299}; z-index: ${zIndex.zIndex299};
`; `;

View File

@ -44,6 +44,7 @@ const PreviewContent = ({ previewComponent, previewProps }: PreviewContentProps)
<StyledPreviewContent className="preview-content">{children}</StyledPreviewContent> <StyledPreviewContent className="preview-content">{children}</StyledPreviewContent>
</ScrollSyncPane>, </ScrollSyncPane>,
element, element,
'preview-content'
); );
}, [previewComponent, previewProps, element]); }, [previewComponent, previewProps, element]);
}; };

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import copyToClipboard from 'copy-text-to-clipboard'; import copyToClipboard from 'copy-text-to-clipboard';
import { isAbsolutePath } from 'netlify-cms-lib-util'; import { isAbsolutePath } from 'netlify-cms-lib-util';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css, Global, ClassNames } from '@emotion/core'; import { css, Global, ClassNames } from '@emotion/react';
import ReactModal from 'react-modal'; import ReactModal from 'react-modal';
import { transitions, shadows, lengths, zIndex } from 'netlify-cms-ui-default'; import { transitions, shadows, lengths, zIndex } from 'netlify-cms-ui-default';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { Icon, Dropdown, DropdownItem, DropdownButton, colors } from 'netlify-cms-ui-default'; import { Icon, Dropdown, DropdownItem, DropdownButton, colors } from 'netlify-cms-ui-default';

View File

@ -1,7 +1,7 @@
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css, Global } from '@emotion/core'; import { css, Global } from '@emotion/react';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import reduxNotificationsStyles from 'redux-notifications/lib/styles.css'; import reduxNotificationsStyles from 'redux-notifications/lib/styles.css';
import { shadows, colors, lengths, zIndex } from 'netlify-cms-ui-default'; import { shadows, colors, lengths, zIndex } from 'netlify-cms-ui-default';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import moment from 'moment'; import moment from 'moment';
import { translate } from 'react-polyglot'; import { translate } from 'react-polyglot';

View File

@ -210,6 +210,12 @@ function getConfigSchema() {
file: { type: 'string' }, file: { type: 'string' },
preview_path: { type: 'string' }, preview_path: { type: 'string' },
preview_path_date_field: { type: 'string' }, preview_path_date_field: { type: 'string' },
editor: {
type: 'object',
properties: {
preview: { type: 'boolean' },
},
},
fields: fieldsConfig(), fields: fieldsConfig(),
}, },
required: ['name', 'label', 'file', 'fields'], required: ['name', 'label', 'file', 'fields'],

View File

@ -114,10 +114,13 @@ function entryDraftReducer(state = Map(), action) {
state.mergeDeepIn(['fieldsMetaData'], fromJS(metadata)); state.mergeDeepIn(['fieldsMetaData'], fromJS(metadata));
const newData = state.getIn(['entry', ...dataPath]); const newData = state.getIn(['entry', ...dataPath]);
const newMeta = state.getIn(['entry', 'meta']); const newMeta = state.getIn(['entry', 'meta']);
if (entries.length === 0) {
return;
}
state.set( state.set(
'hasChanged', 'hasChanged',
!entries.some(e => newData.equals(e.get(...dataPath))) || !newData.equals(entries[0].get(...dataPath)) ||
!entries.some(e => newMeta.equals(e.get('meta'))), !newMeta.equals(entries[0].get('meta')),
); );
}); });
} }

View File

@ -20,7 +20,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
}, },
"dependencies": { "dependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -8,7 +8,7 @@ import {
Global, Global,
keyframes, keyframes,
ClassNames, ClassNames,
} from '@emotion/core'; } from '@emotion/react';
import EmotionStyled from '@emotion/styled'; import EmotionStyled from '@emotion/styled';
import Immutable from 'immutable'; import Immutable from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';

View File

@ -0,0 +1,7 @@
import type { CreateStyled } from '@emotion/styled';
const transientOptions: Parameters<CreateStyled>[1] = {
shouldForwardProp: (propName: string) => !propName.startsWith('$'),
};
export default transientOptions;

View File

@ -22,7 +22,7 @@
"react-transition-group": "^4.0.0" "react-transition-group": "^4.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { Wrapper, Button as DropdownButton, Menu, MenuItem } from 'react-aria-menubutton'; import { Wrapper, Button as DropdownButton, Menu, MenuItem } from 'react-aria-menubutton';

View File

@ -1,17 +1,27 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import PropTypes from 'prop-types';
import React from 'react';
import transientOptions from 'netlify-cms-lib-util';
import Icon from './Icon'; import Icon from './Icon';
import { colors, lengths, buttons } from './styles'; import { buttons, colors, lengths } from './styles';
const TopBar = styled.div` const TopBar = styled(
display: flex; 'div',
justify-content: space-between; transientOptions,
height: 26px; )(
border-radius: ${lengths.borderRadius} ${lengths.borderRadius} 0 0; ({ $isVariableTypesList, $collapsed }) => `
position: relative; display: flex;
`; justify-content: space-between;
height: 32px!important;
border-radius: ${
!$isVariableTypesList
? $collapsed ? lengths.borderRadius : `${lengths.borderRadius} ${lengths.borderRadius} 0 0`
: $collapsed ? `0 ${lengths.borderRadius} ${lengths.borderRadius} ${lengths.borderRadius}` : `0 ${lengths.borderRadius} 0 0`
}!important;
position: relative;
`,
);
const TopBarButton = styled.button` const TopBarButton = styled.button`
${buttons.button}; ${buttons.button};
@ -26,6 +36,16 @@ const TopBarButton = styled.button`
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
position: relative;
`;
const StyledTitle = styled.div`
position: absolute;
left: 36px;
line-height: 30px;
white-space: nowrap;
cursor: pointer;
z-index: 1;
`; `;
const TopBarButtonSpan = TopBarButton.withComponent('span'); const TopBarButtonSpan = TopBarButton.withComponent('span');
@ -44,14 +64,23 @@ function DragHandle({ dragHandleHOC }) {
return <Handle />; return <Handle />;
} }
function ListItemTopBar({ className, collapsed, onCollapseToggle, onRemove, dragHandleHOC }) { function ListItemTopBar({
className,
title,
collapsed,
onCollapseToggle,
onRemove,
dragHandleHOC,
isVariableTypesList,
}) {
return ( return (
<TopBar className={className}> <TopBar className={className} $collapsed={collapsed} $isVariableTypesList={isVariableTypesList}>
{onCollapseToggle ? ( {onCollapseToggle ? (
<TopBarButton onClick={onCollapseToggle}> <TopBarButton onClick={onCollapseToggle}>
<Icon type="chevron" size="small" direction={collapsed ? 'right' : 'down'} /> <Icon type="chevron" size="small" direction={collapsed ? 'right' : 'down'} />
</TopBarButton> </TopBarButton>
) : null} ) : null}
{title ? <StyledTitle onClick={onCollapseToggle}>{title}</StyledTitle> : null}
{dragHandleHOC ? <DragHandle dragHandleHOC={dragHandleHOC} /> : null} {dragHandleHOC ? <DragHandle dragHandleHOC={dragHandleHOC} /> : null}
{onRemove ? ( {onRemove ? (
<TopBarButton onClick={onRemove}> <TopBarButton onClick={onRemove}>
@ -64,9 +93,11 @@ function ListItemTopBar({ className, collapsed, onCollapseToggle, onRemove, drag
ListItemTopBar.propTypes = { ListItemTopBar.propTypes = {
className: PropTypes.string, className: PropTypes.string,
title: PropTypes.node,
collapsed: PropTypes.bool, collapsed: PropTypes.bool,
onCollapseToggle: PropTypes.func, onCollapseToggle: PropTypes.func,
onRemove: PropTypes.func, onRemove: PropTypes.func,
isVariableTypesList: PropTypes.bool,
}; };
const StyledListItemTopBar = styled(ListItemTopBar)` const StyledListItemTopBar = styled(ListItemTopBar)`
@ -75,6 +106,7 @@ const StyledListItemTopBar = styled(ListItemTopBar)`
height: 26px; height: 26px;
border-radius: ${lengths.borderRadius} ${lengths.borderRadius} 0 0; border-radius: ${lengths.borderRadius} ${lengths.borderRadius} 0 0;
position: relative; position: relative;
border-top-left-radius: 0;
`; `;
export default StyledListItemTopBar; export default StyledListItemTopBar;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css, keyframes } from '@emotion/core'; import { css, keyframes } from '@emotion/react';
import { CSSTransition } from 'react-transition-group'; import { CSSTransition } from 'react-transition-group';
import { colors, zIndex } from './styles'; import { colors, zIndex } from './styles';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import Icon from './Icon'; import Icon from './Icon';
@ -14,7 +14,7 @@ const TopBarContainer = styled.div`
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 0 -14px; margin: 0 -14px;
padding: 13px; padding: 6px 13px;
`; `;
const ExpandButtonContainer = styled.div` const ExpandButtonContainer = styled.div`
@ -43,6 +43,7 @@ const ExpandButton = styled.button`
const AddButton = styled.button` const AddButton = styled.button`
${buttons.button} ${buttons.button}
${buttons.widget} ${buttons.widget}
padding: 4px 12px;
${Icon} { ${Icon} {
margin-left: 6px; margin-left: 6px;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import ReactToggled from 'react-toggled'; import ReactToggled from 'react-toggled';
import { colors, colorsRaw, shadows, transitions } from './styles'; import { colors, colorsRaw, shadows, transitions } from './styles';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css, Global } from '@emotion/core'; import { css, Global } from '@emotion/react';
export const quantifier = '.cms-wrapper'; export const quantifier = '.cms-wrapper';
@ -93,7 +93,7 @@ const lengths = {
borderWidth: '2px', borderWidth: '2px',
topCardWidth: '682px', topCardWidth: '682px',
pageMargin: '28px 18px', pageMargin: '28px 18px',
objectWidgetTopBarContainerPadding: '0 14px 14px', objectWidgetTopBarContainerPadding: '0 14px 0',
}; };
const borders = { const borders = {

View File

@ -21,7 +21,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",

View File

@ -1,7 +1,7 @@
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { Toggle, ToggleBackground, colors } from 'netlify-cms-ui-default'; import { Toggle, ToggleBackground, colors } from 'netlify-cms-ui-default';
function BooleanBackground({ isActive, ...props }) { function BooleanBackground({ isActive, ...props }) {

View File

@ -25,7 +25,7 @@
"process:languages": "node ./scripts/process-languages" "process:languages": "node ./scripts/process-languages"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"codemirror": "^5.46.0", "codemirror": "^5.46.0",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { ClassNames } from '@emotion/core'; import { ClassNames } from '@emotion/react';
import { Map } from 'immutable'; import { Map } from 'immutable';
import { uniq, isEqual, isEmpty } from 'lodash'; import { uniq, isEqual, isEmpty } from 'lodash';
import uuid from 'uuid/v4'; import uuid from 'uuid/v4';

View File

@ -25,7 +25,7 @@
"validate-color": "^2.1.0" "validate-color": "^2.1.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",

View File

@ -25,7 +25,7 @@
"react-datetime": "^3.1.1" "react-datetime": "^3.1.1"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"moment": "^2.24.0", "moment": "^2.24.0",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import reactDateTimeStyles from 'react-datetime/css/react-datetime.css'; import reactDateTimeStyles from 'react-datetime/css/react-datetime.css';
import DateTime from 'react-datetime'; import DateTime from 'react-datetime';
import moment from 'moment'; import moment from 'moment';

View File

@ -23,7 +23,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"netlify-cms-widget-date": "^2.5.7", "netlify-cms-widget-date": "^2.5.7",
"react": "^16.8.4 || ^17.0.0" "react": "^16.8.4 || ^17.0.0"
}, },

View File

@ -1,7 +1,7 @@
/** @jsx jsx */ /** @jsx jsx */
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { jsx, css } from '@emotion/core'; import { jsx, css } from '@emotion/react';
import reactDateTimeStyles from 'react-datetime/css/react-datetime.css'; import reactDateTimeStyles from 'react-datetime/css/react-datetime.css';
import DateTime from 'react-datetime'; import DateTime from 'react-datetime';
import moment from 'moment'; import moment from 'moment';

View File

@ -28,7 +28,7 @@
"react-sortable-hoc": "^2.0.0" "react-sortable-hoc": "^2.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { Map, List } from 'immutable'; import { Map, List } from 'immutable';
import { once } from 'lodash'; import { once } from 'lodash';
import uuid from 'uuid/v4'; import uuid from 'uuid/v4';

View File

@ -23,7 +23,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",

View File

@ -25,7 +25,7 @@
"react-sortable-hoc": "^2.0.0" "react-sortable-hoc": "^2.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css, ClassNames } from '@emotion/core'; import { css, ClassNames } from '@emotion/react';
import { List, Map, fromJS } from 'immutable'; import { List, Map, fromJS } from 'immutable';
import { partial, isEmpty, uniqueId } from 'lodash'; import { partial, isEmpty, uniqueId } from 'lodash';
import uuid from 'uuid/v4'; import uuid from 'uuid/v4';
@ -39,7 +39,7 @@ const NestedObjectLabel = styled.div`
border-top: 0; border-top: 0;
color: ${props => (props.error ? colors.errorText : 'inherit')}; color: ${props => (props.error ? colors.errorText : 'inherit')};
background-color: ${colors.textFieldBorder}; background-color: ${colors.textFieldBorder};
padding: 13px; padding: 6px 13px;
border-radius: 0 0 ${lengths.borderRadius} ${lengths.borderRadius}; border-radius: 0 0 ${lengths.borderRadius} ${lengths.borderRadius};
`; `;
@ -56,13 +56,11 @@ const styles = {
listControlItem: css` listControlItem: css`
margin-top: 18px; margin-top: 18px;
&:first-of-type { &:last-of-type {
margin-top: 26px; margin-bottom: 14px;
} }
`, `,
listControlItemCollapsed: css`
padding-bottom: 0;
`,
}; };
const SortableList = SortableContainer(({ items, renderItem }) => { const SortableList = SortableContainer(({ items, renderItem }) => {
@ -546,10 +544,12 @@ export default class ListControl extends React.Component {
onRemove={partial(this.handleRemove, index)} onRemove={partial(this.handleRemove, index)}
dragHandleHOC={SortableHandle} dragHandleHOC={SortableHandle}
data-testid={`styled-list-item-top-bar-${key}`} data-testid={`styled-list-item-top-bar-${key}`}
title={collapsed ? this.objectLabel(item) : null}
isVariableTypesList={isVariableTypesList}
/> />
<NestedObjectLabel collapsed={collapsed} error={hasError}> {/* <NestedObjectLabel collapsed={collapsed} error={hasError}>
{this.objectLabel(item)} {this.objectLabel(item)}
</NestedObjectLabel> </NestedObjectLabel> */}
<ClassNames> <ClassNames>
{({ css, cx }) => ( {({ css, cx }) => (
<ObjectControl <ObjectControl

View File

@ -22,7 +22,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"netlify-cms-ui-default": "^2.12.1", "netlify-cms-ui-default": "^2.12.1",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { ClassNames } from '@emotion/core'; import { ClassNames } from '@emotion/react';
import olStyles from 'ol/ol.css'; import olStyles from 'ol/ol.css';
import Map from 'ol/Map.js'; import Map from 'ol/Map.js';
import View from 'ol/View.js'; import View from 'ol/View.js';

View File

@ -42,7 +42,7 @@
"unist-util-visit-parents": "^2.0.1" "unist-util-visit-parents": "^2.0.1"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { ClassNames } from '@emotion/core'; import { ClassNames } from '@emotion/react';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { Value } from 'slate'; import { Value } from 'slate';
import { Editor as Slate, setEventTransfer } from 'slate-react'; import { Editor as Slate, setEventTransfer } from 'slate-react';

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { List } from 'immutable'; import { List } from 'immutable';
import { import {
Toggle, Toggle,

View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { fromJS } from 'immutable'; import { fromJS } from 'immutable';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css as coreCss, ClassNames } from '@emotion/core'; import { css as coreCss, ClassNames } from '@emotion/react';
import { get, isEmpty, debounce } from 'lodash'; import { get, isEmpty, debounce } from 'lodash';
import { Value, Document, Block, Text } from 'slate'; import { Value, Document, Block, Text } from 'slate';
import { Editor as Slate } from 'slate-react'; import { Editor as Slate } from 'slate-react';

View File

@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */ /* eslint-disable react/prop-types */
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { Map, fromJS } from 'immutable'; import { Map, fromJS } from 'immutable';
import { omit } from 'lodash'; import { omit } from 'lodash';

View File

@ -1,6 +1,6 @@
/* eslint-disable react/prop-types */ /* eslint-disable react/prop-types */
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { zIndex } from 'netlify-cms-ui-default'; import { zIndex } from 'netlify-cms-ui-default';
function InsertionPoint(props) { function InsertionPoint(props) {

View File

@ -1,6 +1,6 @@
/* eslint-disable react/display-name */ /* eslint-disable react/display-name */
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { colors, lengths } from 'netlify-cms-ui-default'; import { colors, lengths } from 'netlify-cms-ui-default';

View File

@ -23,7 +23,7 @@
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -1,14 +1,15 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { ClassNames } from '@emotion/core'; import { ClassNames } from '@emotion/react';
import styled from '@emotion/styled';
import { List, Map } from 'immutable'; import { List, Map } from 'immutable';
import { colors, lengths, ObjectWidgetTopBar } from 'netlify-cms-ui-default'; import { colors, lengths, ObjectWidgetTopBar } from 'netlify-cms-ui-default';
import { stringTemplate } from 'netlify-cms-lib-widgets'; import { stringTemplate } from 'netlify-cms-lib-widgets';
const styleStrings = { const styleStrings = {
nestedObjectControl: ` nestedObjectControl: `
padding: 6px 14px 14px; padding: 6px 14px 0;
border-top: 0; border-top: 0;
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
@ -21,6 +22,10 @@ const styleStrings = {
`, `,
}; };
const StyledFieldsBox = styled.div`
padding-bottom: 14px;
`;
export default class ObjectControl extends React.Component { export default class ObjectControl extends React.Component {
componentValidate = {}; componentValidate = {};
@ -175,7 +180,7 @@ export default class ObjectControl extends React.Component {
t={t} t={t}
/> />
)} )}
<div <StyledFieldsBox
className={cx({ className={cx({
[css` [css`
${styleStrings.collapsedObjectControl} ${styleStrings.collapsedObjectControl}
@ -183,7 +188,7 @@ export default class ObjectControl extends React.Component {
})} })}
> >
{this.renderFields(multiFields, singleField)} {this.renderFields(multiFields, singleField)}
</div> </StyledFieldsBox>
</div> </div>
)} )}
</ClassNames> </ClassNames>

View File

@ -27,7 +27,7 @@
"react-window": "^1.8.5" "react-window": "^1.8.5"
}, },
"peerDependencies": { "peerDependencies": {
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"immutable": "^3.7.6", "immutable": "^3.7.6",
"lodash": "^4.17.11", "lodash": "^4.17.11",

View File

@ -42,12 +42,12 @@ module.exports = {
amd: 'lodash', amd: 'lodash',
umd: 'lodash', umd: 'lodash',
}, },
'@emotion/core': { '@emotion/react': {
root: ['NetlifyCmsDefaultExports', 'EmotionCore'], root: ['NetlifyCmsDefaultExports', 'EmotionCore'],
commonjs2: '@emotion/core', commonjs2: '@emotion/react',
commonjs: '@emotion/core', commonjs: '@emotion/react',
amd: '@emotion/core', amd: '@emotion/react',
umd: '@emotion/core', umd: '@emotion/react',
}, },
'@emotion/styled': { '@emotion/styled': {
root: ['NetlifyCmsDefaultExports', 'EmotionStyled'], root: ['NetlifyCmsDefaultExports', 'EmotionStyled'],

View File

@ -15,7 +15,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@emotion/cache": "11.10.3", "@emotion/cache": "11.10.3",
"@emotion/core": "11.0.0", "@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4", "@emotion/styled": "11.10.4",
"dayjs": "^1.8.23", "dayjs": "^1.8.23",
"emotion-theming": "^10.0.27", "emotion-theming": "^10.0.27",

View File

@ -2,7 +2,7 @@ import React from 'react';
import CMS from 'netlify-cms-app'; import CMS from 'netlify-cms-app';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import Prism from 'prismjs'; import Prism from 'prismjs';
import { CacheProvider } from '@emotion/core'; import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache'; import createCache from '@emotion/cache';
import BlogPostTemplate from '../components/blog-post-template'; import BlogPostTemplate from '../components/blog-post-template';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Container from './container'; import Container from './container';
import Markdown from './markdown'; import Markdown from './markdown';

View File

@ -1,4 +1,4 @@
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import theme from '../theme'; import theme from '../theme';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Markdownify from './markdownify'; import Markdownify from './markdownify';
import PageHero from './page-hero'; import PageHero from './page-hero';

View File

@ -1,5 +1,5 @@
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import { mq } from '../utils'; import { mq } from '../utils';
import theme from '../theme'; import theme from '../theme';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
function EditLink({ collection, filename }) { function EditLink({ collection, filename }) {
return ( return (

View File

@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Link, graphql, StaticQuery } from 'gatsby'; import { Link, graphql, StaticQuery } from 'gatsby';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import GitHubButton from 'react-github-btn'; import GitHubButton from 'react-github-btn';
import Container from './container'; import Container from './container';

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import theme from '../theme'; import theme from '../theme';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Container from './container'; import Container from './container';
import theme from '../theme'; import theme from '../theme';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import moment from 'moment'; import moment from 'moment';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Markdownify from '../components/markdownify'; import Markdownify from '../components/markdownify';
import theme from '../theme'; import theme from '../theme';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import Page from './page'; import Page from './page';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Container from './container'; import Container from './container';
import Release from './release'; import Release from './release';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { Helmet } from 'react-helmet'; import { Helmet } from 'react-helmet';
import { Link, graphql } from 'gatsby'; import { Link, graphql } from 'gatsby';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Layout from '../components/layout'; import Layout from '../components/layout';
import Container from '../components/container'; import Container from '../components/container';

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { graphql } from 'gatsby'; import { graphql } from 'gatsby';
import styled from '@emotion/styled'; import styled from '@emotion/styled';
import { css } from '@emotion/core'; import { css } from '@emotion/react';
import Layout from '../components/layout'; import Layout from '../components/layout';
import Markdownify from '../components/markdownify'; import Markdownify from '../components/markdownify';