Adjust editor width dynamically

This commit is contained in:
Daniel Lautzenheiser 2022-09-22 18:44:21 -04:00
parent 5ca98dac68
commit 1bac90f12d
4 changed files with 5 additions and 3 deletions

View File

@ -70,7 +70,7 @@ function ReactSplitPaneGlobalStyles() {
const StyledSplitPane = styled.div`
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
grid-template-columns: min(864px, 50%) auto;;
height: 100%;
> div:nth-child(2)::before {

View File

@ -14,7 +14,7 @@ interface PreviewContentProps {
}
const StyledPreviewContent = styled.div`
width: calc(50% - 2px);
width: calc(100% - min(864px, 50%));
top: 66px;
right: 0;
position: absolute;

View File

@ -55,6 +55,7 @@ import {
parsePointerFile,
getPointerFileForMediaFileObj,
} from './git-lfs';
import transientOptions from './transientOptions';
import type { PointerFile as PF } from './git-lfs';
import type { FetchError as FE, ApiRequest as AR } from './API';
@ -207,4 +208,5 @@ export {
allEntriesByFolder,
AccessTokenError,
throwOnConflictingBranches,
transientOptions,
};

View File

@ -1,7 +1,7 @@
import styled from '@emotion/styled';
import PropTypes from 'prop-types';
import React from 'react';
import transientOptions from 'netlify-cms-lib-util';
import { transientOptions } from 'netlify-cms-lib-util';
import Icon from './Icon';
import { buttons, colors, lengths } from './styles';