feat: upgrade to Emotion 10 (#2166)
This commit is contained in:
@ -21,11 +21,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^5.2.0",
|
||||
"webpack": "^4.16.1",
|
||||
"webpack-cli": "^3.1.0"
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-cli": "^3.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"emotion": "^9.2.6",
|
||||
"@emotion/core": "^10.0.9",
|
||||
"lodash": "^4.17.10",
|
||||
"netlify-cms-ui-default": "^2.0.0",
|
||||
"prop-types": "^15.5.10",
|
||||
|
@ -1,12 +1,18 @@
|
||||
/** @jsx jsx */
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import styled from 'react-emotion';
|
||||
import { jsx, css } from '@emotion/core';
|
||||
import { Toggle, ToggleBackground, colors } from 'netlify-cms-ui-default';
|
||||
|
||||
const BooleanBackground = styled(ToggleBackground)`
|
||||
background-color: ${props => (props.isActive ? colors.active : colors.textFieldBorder)};
|
||||
`;
|
||||
const BooleanBackground = ({ isActive, ...props }) => (
|
||||
<ToggleBackground
|
||||
css={css`
|
||||
background-color: ${isActive ? colors.active : colors.textFieldBorder};
|
||||
`}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
export default class BooleanControl extends React.Component {
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user