Clean up the props, removing unused and making some optional
This commit is contained in:
parent
99b9bc6b1e
commit
d6cec6886c
|
@ -144,8 +144,6 @@ export interface SquiggleChartProps {
|
||||||
diagramStop?: number;
|
diagramStop?: number;
|
||||||
/** If the result is a function, how many points along the function it samples */
|
/** If the result is a function, how many points along the function it samples */
|
||||||
diagramCount?: number;
|
diagramCount?: number;
|
||||||
/** variables declared before this expression */
|
|
||||||
environment?: unknown;
|
|
||||||
/** When the environment changes */
|
/** When the environment changes */
|
||||||
onChange?(expr: squiggleExpression): void;
|
onChange?(expr: squiggleExpression): void;
|
||||||
/** CSS width of the element */
|
/** CSS width of the element */
|
||||||
|
|
|
@ -32,16 +32,14 @@ export interface SquiggleEditorProps {
|
||||||
diagramStop?: number;
|
diagramStop?: number;
|
||||||
/** If the result is a function, how many points along the function it samples */
|
/** If the result is a function, how many points along the function it samples */
|
||||||
diagramCount?: number;
|
diagramCount?: number;
|
||||||
/** The environment, other variables that were already declared */
|
|
||||||
environment?: unknown;
|
|
||||||
/** when the environment changes. Used again for notebook magic*/
|
/** when the environment changes. Used again for notebook magic*/
|
||||||
onChange?(expr: squiggleExpression): void;
|
onChange?(expr: squiggleExpression): void;
|
||||||
/** The width of the element */
|
/** The width of the element */
|
||||||
width: number;
|
width?: number;
|
||||||
/** Previous variable declarations */
|
/** Previous variable declarations */
|
||||||
bindings: bindings;
|
bindings?: bindings;
|
||||||
/** JS Imports */
|
/** JS Imports */
|
||||||
jsImports: jsImports;
|
jsImports?: jsImports;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Input = styled.div`
|
const Input = styled.div`
|
||||||
|
@ -61,7 +59,6 @@ export let SquiggleEditor: React.FC<SquiggleEditorProps> = ({
|
||||||
diagramStop,
|
diagramStop,
|
||||||
diagramCount,
|
diagramCount,
|
||||||
onChange,
|
onChange,
|
||||||
environment,
|
|
||||||
bindings = defaultBindings,
|
bindings = defaultBindings,
|
||||||
jsImports = defaultImports,
|
jsImports = defaultImports,
|
||||||
}: SquiggleEditorProps) => {
|
}: SquiggleEditorProps) => {
|
||||||
|
@ -87,7 +84,6 @@ export let SquiggleEditor: React.FC<SquiggleEditorProps> = ({
|
||||||
diagramStart={diagramStart}
|
diagramStart={diagramStart}
|
||||||
diagramStop={diagramStop}
|
diagramStop={diagramStop}
|
||||||
diagramCount={diagramCount}
|
diagramCount={diagramCount}
|
||||||
environment={environment}
|
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
bindings={bindings}
|
bindings={bindings}
|
||||||
jsImports={jsImports}
|
jsImports={jsImports}
|
||||||
|
@ -145,8 +141,6 @@ export interface SquigglePartialProps {
|
||||||
diagramCount?: number;
|
diagramCount?: number;
|
||||||
/** when the environment changes. Used again for notebook magic*/
|
/** when the environment changes. Used again for notebook magic*/
|
||||||
onChange?(expr: bindings): void;
|
onChange?(expr: bindings): void;
|
||||||
/** The width of the element */
|
|
||||||
width: number;
|
|
||||||
/** Previously declared variables */
|
/** Previously declared variables */
|
||||||
bindings?: bindings;
|
bindings?: bindings;
|
||||||
/** Variables imported from js */
|
/** Variables imported from js */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user