Skip to content

Commit

Permalink
remove inline style
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Sep 12, 2024
1 parent 30d715d commit 4d8e2b0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions docs/src/components/Terminal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useLayoutEffect, useRef, CSSProperties } from 'react';
import { useLayoutEffect, useRef } from 'react';
import useIsBrowser from '@docusaurus/useIsBrowser';
import Head from '@docusaurus/Head';

Expand All @@ -14,10 +14,6 @@ const replReady = () => {

import { initTerminal, destroyTerminal } from './terminal';

export interface TerminalProps extends CSSProperties {
'--rows': number;
}

export default function Interpreter(): JSX.Element {
const ref = useRef<HTMLDivElement>();

Expand Down Expand Up @@ -46,10 +42,6 @@ export default function Interpreter(): JSX.Element {
return !!getComputedStyle(ref.current).getPropertyValue('--base-background');
}

const terminalStyle = {
'--rows': 15
} as TerminalProps;

return (
<>
<Head>
Expand All @@ -59,7 +51,7 @@ export default function Interpreter(): JSX.Element {
{isStatic && <script src="https://cdn.jsdelivr.net/combine/npm/jquery.terminal/js/jquery.terminal.min.js,npm/js-polyfills/keyboard.js" />}
</Head>
<div className="terminal marker" ref={ref}></div>
<div className="term" style={terminalStyle} />
<div className="term"/>
</>
);
};

0 comments on commit 4d8e2b0

Please sign in to comment.