Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
zIndex: '2',
boxShadow: '0px 0px 20px rgba(0, 0, 0, 0.1)',
borderRadius: '2px'
}),
background: css({
display: 'block',
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: '#599ded' // corresponds to logo
}),
featuresListItem: css({
listStyleType: 'disc',
marginLeft: tokens.spacingM
}),
light: css({
color: tokens.colorTextLight,
marginTop: tokens.spacingM
}),
logo: css({
width: '100%',
display: 'flex',
justifyContent: 'center',
marginTop: tokens.spacingXl,
marginBottom: tokens.spacingXl,
'& > img': css({
width: '80px'
})
}),
paragraph: css({
export interface Props {
product: Product;
selectProduct: (sku: string) => void;
}
const styles = {
productWrapper: css({
display: 'flex',
position: 'relative',
overflow: 'hidden',
':not(:first-of-type)': css({
marginLeft: tokens.spacingXs
}),
'&:last-child': css({
marginRight: tokens.spacingXs
})
}),
product: css({
border: '1px solid',
borderColor: tokens.colorElementLight,
borderRadius: '3px',
display: 'flex',
flexDirection: 'column',
height: '40px',
width: '40px',
outline: 0,
textAlign: 'center',
transition: `all ${tokens.transitionDurationDefault} ${tokens.transitionEasingDefault}`,
position: 'relative',
transform: 'translateZ(0)', // Force hardware acceleration for transitions
willChange: 'box-shadow, border-color',
}),
background: css({
display: 'block',
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: '#599ded' // corresponds to logo
}),
featuresListItem: css({
listStyleType: 'disc',
marginLeft: tokens.spacingM
}),
light: css({
color: tokens.colorTextLight,
marginTop: tokens.spacingM
}),
logo: css({
width: '100%',
display: 'flex',
justifyContent: 'center',
marginTop: tokens.spacingXl,
marginBottom: tokens.spacingXl,
'& > img': css({
width: '80px'
})
}),
paragraph: css({
marginTop: tokens.spacingM
}),
heading: css({
import tokens from '@contentful/forma-36-tokens';
import { css } from 'emotion';
export const styles = {
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'
}),
background: css({
display: 'block',
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: '#599ded' // corresponds to logo
}),
featuresListItem: css({
import tokens from '@contentful/forma-36-tokens';
import { css } from 'emotion';
export const styles = {
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'
}),
background: css({
display: 'block',
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: '#599ded' // corresponds to logo
}),
featuresListItem: css({
listStyleType: 'disc',
marginLeft: tokens.spacingM
import tokens from '@contentful/forma-36-tokens';
import { css } from 'emotion';
export const styles = {
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'
}),
background: css({
display: 'block',
position: 'absolute',
zIndex: '-1',
top: '0',
width: '100%',
height: '300px',
backgroundColor: '#599ded' // corresponds to logo
}),
featuresListItem: css({
listStyleType: 'disc',
export default function UploadView(props) {
const imageUrl = props.imageUrl || `${props.base64Prefix},${props.base64Data}`;
const isSVG = imageUrl.endsWith('.svg') || imageUrl.includes('svg+xml');
const progressViewStyles = {
backgroundColor: tokens.colorElementLight
};
// Pass upload progress as CSS variable so we can adjust the size of progress components
const uploadProgress = {
'--uploadProgress': `${props.uploadProgress}%`
};
return (
<div>
<main style="{progressViewStyles}">
{isSVG ? (
) : (
<img alt="image being uploaded" src="{imageUrl}">
)}
<aside style="{uploadProgress}"></aside></main></div>
const styles = {
productWrapper: css({
display: 'flex',
position: 'relative',
overflow: 'hidden',
':not(:first-of-type)': css({
marginLeft: tokens.spacingXs
}),
'&:last-child': css({
marginRight: tokens.spacingXs
})
}),
product: css({
border: '1px solid',
borderColor: tokens.colorElementLight,
borderRadius: '3px',
display: 'flex',
flexDirection: 'column',
height: '40px',
width: '40px',
outline: 0,
textAlign: 'center',
transition: `all ${tokens.transitionDurationDefault} ${tokens.transitionEasingDefault}`,
position: 'relative',
transform: 'translateZ(0)', // Force hardware acceleration for transitions
willChange: 'box-shadow, border-color',
'&:hover': {
borderColor: tokens.colorElementDarkest,
cursor: 'pointer',
'> span > div': {
opacity: 1
product: css({
border: '1px solid',
borderColor: tokens.colorElementLight,
borderRadius: '3px',
display: 'flex',
flexDirection: 'column',
height: '40px',
width: '40px',
outline: 0,
textAlign: 'center',
transition: `all ${tokens.transitionDurationDefault} ${tokens.transitionEasingDefault}`,
position: 'relative',
transform: 'translateZ(0)', // Force hardware acceleration for transitions
willChange: 'box-shadow, border-color',
'&:hover': {
borderColor: tokens.colorElementDarkest,
cursor: 'pointer',
'> span > div': {
opacity: 1
}
}
}),
previewImg: (imageHasLoaded: boolean) =>
css({
display: imageHasLoaded ? 'block' : 'none',
margin: '0 auto',
minWidth: 'auto',
height: '40px'
}),
removeIcon: css({
backgroundColor: 'rgba(0,0,0,.65)',
borderRadius: '50%',
import PropTypes from 'prop-types';
import { css } from 'emotion';
import tokens from '@contentful/forma-36-tokens';
import { Button, ValidationMessage } from '@contentful/forma-36-react-components';
import { normalizeMessage, isOutOfOrder, isDuplicate, messageToState } from './message-processor';
import { createPubSub } from './pubnub-client';
import { EVENT_TRIGGERED, EVENT_TRIGGER_FAILED } from '../constants';
const styles = {
info: css({
color: tokens.colorTextLight,
marginTop: tokens.spacingS,
marginBottom: tokens.spacingM,
fontSize: tokens.fontSizeS,
fontWeight: tokens.fontWeightNormal
}),
header: css({
display: 'flex',
marginBottom: tokens.spacingS
})
};
export default class NeflifySidebarBuildButton extends React.Component {
static propTypes = {
site: PropTypes.object.isRequired,
users: PropTypes.arrayOf(PropTypes.object.isRequired).isRequired,
userId: PropTypes.string.isRequired
};