Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const styles = {
table: css({
marginTop: tokens.spacingL
}),
link: css({
marginRight: tokens.spacingS
}),
contentTypeRow: css({
gridTemplateColumns: 'auto 6rem'
}),
refList: css({
display: 'flex',
flexDirection: 'row'
}),
sectionHeading: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingM
})
};
ContentTypes.propTypes = {
addedContentTypes: PropTypes.array.isRequired,
allContentTypes: PropTypes.array.isRequired,
allReferenceFields: PropTypes.object.isRequired,
onAddContentType: PropTypes.func.isRequired,
onDeleteContentType: PropTypes.func.isRequired
};
function isContentTypeValidSelection(contentType, addedContentTypes, isEditMode) {
const { id } = contentType.sys;
return (
id !== VARIATION_CONTAINER_ID &&
container: css({
margin: `${tokens.spacingXl} 0`
}),
row: css({
display: 'flex',
margin: `${tokens.spacingXl} 0`
}),
item: css({
marginRight: tokens.spacingXl
}),
removeBtn: css({
marginTop: tokens.spacingL
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
})
};
export default class NetlifyConfigEditor extends React.Component {
static propTypes = {
disabled: PropTypes.bool.isRequired,
siteConfigs: PropTypes.array.isRequired,
netlifySites: PropTypes.array.isRequired,
onSiteConfigsChange: PropTypes.func.isRequired
};
onNetlifySiteChange = (configIndex, netlifySiteId) => {
const { netlifySites, siteConfigs, onSiteConfigsChange } = this.props;
{contentTypes.map(ct => {
const fields = compatibleFields[ct.sys.id];
return (
<div>
{ct.name}
<form>
{fields.map(field => (
))}
</form></div>
);
})}
export default {
body: css({
height: 'auto',
minHeight: '65vh',
margin: '0 auto',
marginTop: tokens.spacingXl,
padding: `${tokens.spacingXl} ${tokens.spacing2Xl}`,
maxWidth: tokens.contentWidthText,
backgroundColor: tokens.colorWhite,
zIndex: '2',
boxShadow: '0px 0px 20px rgba(0, 0, 0, 0.1)',
borderRadius: '2px'
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
}),
background: css({
display: 'block',
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: '#452475',
backgroundImage:
'linear-gradient(45deg,#542c85 25%,transparent 25%,transparent 50%,#542c85 50%,#542c85 75%,transparent 75%,transparent)'
}),
input: css({
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: 'rgb(23,64,121)',
background: 'linear-gradient(90deg, rgba(23,64,121,1) 0%, rgba(27,158,156,1) 100%)'
}),
section: css({
margin: `${tokens.spacingXl} 0`
}),
input: css({
marginTop: tokens.spacingM
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
}),
icon: css({
display: 'flex',
justifyContent: 'center',
marginTop: tokens.spacingXl,
marginBottom: tokens.spacingXl
}),
checks: css({
marginTop: tokens.spacingM,
display: 'flex'
}),
pills: css({
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: 'rgb(23,64,121)',
background: 'linear-gradient(90deg, rgba(23,64,121,1) 0%, rgba(27,158,156,1) 100%)'
}),
section: css({
margin: `${tokens.spacingXl} 0`
}),
input: css({
marginTop: tokens.spacingM
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
}),
icon: css({
display: 'flex',
justifyContent: 'center',
marginTop: tokens.spacingXl,
marginBottom: tokens.spacingXl
}),
checks: css({
marginTop: tokens.spacingM,
display: 'flex'
}),
pills: css({
margin: `0 ${tokens.spacingXs}`
background: (color: string) =>
css({
display: 'block',
position: 'absolute',
zIndex: -1,
top: 0,
width: '100%',
height: '300px',
backgroundColor: color
}),
section: css({
margin: `${tokens.spacingXl} 0`
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
}),
icon: css({
display: 'flex',
justifyContent: 'center',
'> img': {
display: 'block',
width: '70px',
margin: `${tokens.spacingXl} 0`
}
})
};
export default class AppConfig extends React.Component {
}),
button: css({
backgroundColor: '#00ad9e',
color: '#fff',
padding: '12px 80px',
outline: 'none',
borderRadius: '6px',
border: '1px solid #e9ebeb',
borderBottom: '1px solid #e1e2e4',
boxShadow: '0 2px 4px 0 rgba(14,30,37,.12)',
cursor: 'pointer',
fontSize: '16px',
boxSizing: 'border-box'
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
}),
connectAgain: css({
marginTop: tokens.spacingXs,
textAlign: 'center',
color: tokens.colorTextLight
}),
connectAgainIcon: css({
fill: tokens.colorTextLight,
marginRight: tokens.spacingXs,
verticalAlign: 'middle'
})
};
const PICK_OPTION_VALUE = '__pick__';
const styles = {
container: css({
margin: `${tokens.spacingXl} 0`
}),
row: css({
display: 'flex',
margin: `${tokens.spacingXl} 0`
}),
item: css({
marginRight: tokens.spacingXl
}),
removeBtn: css({
marginTop: tokens.spacingL
}),
splitter: css({
marginTop: tokens.spacingL,
marginBottom: tokens.spacingL,
border: 0,
height: '1px',
backgroundColor: tokens.colorElementMid
})
};
export default class NetlifyConfigEditor extends React.Component {
static propTypes = {
disabled: PropTypes.bool.isRequired,
siteConfigs: PropTypes.array.isRequired,
netlifySites: PropTypes.array.isRequired,
onSiteConfigsChange: PropTypes.func.isRequired
import { css } from 'emotion';
import tokens from '@contentful/forma-36-tokens';
export const styles = {
header: css({
display: 'flex',
justifyContent: 'space-between',
padding: tokens.spacingL
}),
body: css({
height: 'calc(100vh - 140px)',
overflowY: 'auto',
padding: `${tokens.spacingL} ${tokens.spacingL} 0 ${tokens.spacingL}`
}),
total: css({
fontSize: tokens.fontSizeS,
color: tokens.colorTextLight,
display: 'block',
marginTop: tokens.spacingS
}),
saveBtn: css({
marginRight: tokens.spacingM
}),
paginator: css({
margin: `${tokens.spacingM} auto ${tokens.spacingL} auto`,
textAlign: 'center'
}),
leftsideControls: css({
position: 'relative',