16b1605a35
This option allows users to bypass the "publish preview" modal. Users can disable it by checking "don't show this again" in the modal, and re-enable it in the Settings Page.
31 lines
706 B
JavaScript
31 lines
706 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { FormField } from 'component/common/form';
|
|
import { withRouter } from 'react-router';
|
|
|
|
type Props = {
|
|
enablePublishPreview: boolean,
|
|
setEnablePublishPreview: boolean => void,
|
|
};
|
|
|
|
function PublishSettings(props: Props) {
|
|
const { enablePublishPreview, setEnablePublishPreview } = props;
|
|
|
|
function handleChange() {
|
|
setEnablePublishPreview(!enablePublishPreview);
|
|
}
|
|
|
|
return (
|
|
<div>
|
|
<FormField
|
|
type="checkbox"
|
|
name="sync_toggle"
|
|
label={__('Skip preview and confirmation')}
|
|
checked={!enablePublishPreview}
|
|
onChange={handleChange}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default withRouter(PublishSettings);
|