Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
};
state = { history: [] };
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',
zIndex: 0,
svg: css({
zIndex: 1,
import { css } from 'emotion';
import tokens from '@contentful/forma-36-tokens';
export default {
info: css({
color: tokens.colorTextLight,
marginBottom: tokens.spacingM,
fontSize: tokens.fontSizeS,
fontWeight: tokens.fontWeightNormal
}),
button: css({
marginBottom: tokens.spacingS
}),
previewButton: css({
margin: `${tokens.spacingS} 0`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}),
previewContent: css({
display: 'flex',
alignContent: 'center'
}),
previewIcon: css({