Skip to content

Commit

Permalink
Add default CSS if workpad CSS is missing in Canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
poffdeluxe committed Nov 3, 2021
1 parent 6cf9f8c commit c209c84
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import Style from 'style-it';
// @ts-expect-error
import { WorkpadPage } from '../workpad_page';
import { Fullscreen } from '../fullscreen';
import { HEADER_BANNER_HEIGHT, WORKPAD_CANVAS_BUFFER } from '../../../common/lib/constants';
import {
HEADER_BANNER_HEIGHT,
WORKPAD_CANVAS_BUFFER,
DEFAULT_WORKPAD_CSS,
} from '../../../common/lib/constants';
import { CommitFn, CanvasPage } from '../../../types';
import { WorkpadShortcuts } from './workpad_shortcuts.component';

Expand Down Expand Up @@ -122,7 +126,7 @@ export const Workpad: FC<Props> = ({

// NOTE: the data-shared-* attributes here are used for reporting
return Style.it(
workpadCss,
workpadCss || DEFAULT_WORKPAD_CSS,
<div
className={`canvasWorkpad ${isFullscreenProp ? 'fullscreen' : ''}`}
style={fsStyle}
Expand Down

0 comments on commit c209c84

Please sign in to comment.