feat: upgrade to Emotion 10 (#2166)
This commit is contained in:
@ -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