This commit is contained in:
Nathan Bierema 2025-06-01 07:37:14 -04:00
parent 2166ef27db
commit 4754cc1ae9
2 changed files with 3 additions and 11 deletions

View File

@ -1,7 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import styled from 'styled-components'; import styled from 'styled-components';
import CodeMirror, { EditorChange } from 'codemirror'; import CodeMirror, { EditorChange } from 'codemirror';
import type { Base16Theme } from 'react-base16-styling';
import { defaultStyle, themedStyle } from './styles'; import { defaultStyle, themedStyle } from './styles';
import { Theme } from '../themes/default'; import { Theme } from '../themes/default';
@ -28,7 +27,6 @@ export interface EditorProps {
lineNumbers: boolean; lineNumbers: boolean;
lineWrapping: boolean; lineWrapping: boolean;
readOnly: boolean; readOnly: boolean;
theme?: Base16Theme;
foldGutter: boolean; foldGutter: boolean;
autofocus: boolean; autofocus: boolean;
onChange?: (value: string, change: EditorChange) => void; onChange?: (value: string, change: EditorChange) => void;
@ -93,7 +91,7 @@ export default class Editor extends Component<EditorProps> {
}; };
render() { render() {
return <EditorContainer ref={this.getRef} theme={this.props.theme} />; return <EditorContainer ref={this.getRef} />;
} }
static defaultProps = { static defaultProps = {

View File

@ -1,6 +1,4 @@
import styled, { ThemedStyledInterface } from 'styled-components'; import styled from 'styled-components';
import type { Base16Theme } from 'react-base16-styling';
import * as CSS from 'csstype';
export type BorderPosition = 'top' | 'bottom'; export type BorderPosition = 'top' | 'bottom';
@ -11,11 +9,7 @@ export interface Props {
noBorder?: boolean; noBorder?: boolean;
} }
const Toolbar = ( const Toolbar = styled.div<Props>`
styled as ThemedStyledInterface<
Base16Theme & { fontFamily?: CSS.Property.FontFamily }
>
).div<Props>`
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
box-sizing: border-box; box-sizing: border-box;