fix(redux-devtools-test-generator): fix devui's Select component (#637)

* Stash

* Fix stuff

* Unused

* Update snapshot
This commit is contained in:
Nathan Bierema 2020-09-19 19:24:18 -04:00 committed by GitHub
parent d49535da03
commit f9f15a41de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 3303 additions and 3260 deletions

View File

@ -47,7 +47,6 @@
"base16": "^1.0.0", "base16": "^1.0.0",
"codemirror": "^5.56.0", "codemirror": "^5.56.0",
"color": "^3.1.2", "color": "^3.1.2",
"hoist-non-react-statics": "^3.3.2",
"prop-types": "^15.7.2", "prop-types": "^15.7.2",
"react-icons": "^3.10.0", "react-icons": "^3.10.0",
"react-jsonschema-form": "^1.8.1", "react-jsonschema-form": "^1.8.1",

View File

@ -38,6 +38,11 @@ export class Select extends (PureComponent || Component)<SelectProps> {
neutral60: this.props.theme.base06, neutral60: this.props.theme.base06,
neutral80: this.props.theme.base07, neutral80: this.props.theme.base07,
}, },
spacing: {
...theme.spacing,
baseUnit: 2,
controlHeight: this.props.theme.inputHeight,
},
})} })}
/> />
); );

View File

@ -1,5 +1,4 @@
import React, { ComponentType } from 'react'; import React from 'react';
import hoistNonReactStatics from 'hoist-non-react-statics';
import getDefaultTheme, { Theme } from '../themes/default'; import getDefaultTheme, { Theme } from '../themes/default';
import { withTheme } from 'styled-components'; import { withTheme } from 'styled-components';
import { Base16Theme } from 'base16'; import { Base16Theme } from 'base16';
@ -9,33 +8,16 @@ export default <C extends React.ComponentType<any>>(
? C ? C
: never : never
) => { ) => {
const ThemedComponent = React.forwardRef<C, React.ComponentProps<C>>( return withTheme((props) => {
(props, ref) => { return props.theme && props.theme.type ? (
// eslint-disable-next-line react/prop-types <UnthemedComponent {...props} />
if (props.theme && props.theme.type) { ) : (
const ThemedComponent = withTheme( <UnthemedComponent
UnthemedComponent as ComponentType<{ theme?: Theme }>
);
return <ThemedComponent {...props} ref={ref} />;
}
const UnthemedComponentAny = UnthemedComponent as any;
return (
<UnthemedComponentAny
{...props} {...props}
ref={ref} theme={getDefaultTheme((props.theme ?? {}) as Base16Theme)}
theme={getDefaultTheme({} as Base16Theme)}
/> />
); );
} });
);
hoistNonReactStatics(ThemedComponent, UnthemedComponent);
ThemedComponent.displayName = `ThemedComponent(${
UnthemedComponent.displayName ?? 'Component'
})`;
return ThemedComponent;
}; };
// TODO: memoize it? // TODO: memoize it?

View File

@ -5,18 +5,18 @@ exports[`Select renders correctly 1`] = `
class=" css-2b097c-container" class=" css-2b097c-container"
> >
<div <div
class=" css-1960ht7-control" class=" css-vmgz7k-control"
> >
<div <div
class=" css-g1d714-ValueContainer" class=" css-be27w2-ValueContainer"
> >
<div <div
class=" css-1wa3eu0-placeholder" class=" css-1osw1h9-placeholder"
> >
Select... Select...
</div> </div>
<div <div
class="css-ybs8ec-Input" class="css-187dxxn-Input"
> >
<div <div
class="" class=""
@ -44,11 +44,11 @@ exports[`Select renders correctly 1`] = `
class=" css-1hb7zxy-IndicatorsContainer" class=" css-1hb7zxy-IndicatorsContainer"
> >
<span <span
class=" css-bqiiy2-indicatorSeparator" class=" css-1urf5ax-indicatorSeparator"
/> />
<div <div
aria-hidden="true" aria-hidden="true"
class=" css-kaqmzc-indicatorContainer" class=" css-aazq4s-indicatorContainer"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -73,18 +73,18 @@ exports[`Select renders with props 1`] = `
class=" css-2b097c-container" class=" css-2b097c-container"
> >
<div <div
class=" css-1960ht7-control" class=" css-vmgz7k-control"
> >
<div <div
class=" css-g1d714-ValueContainer" class=" css-be27w2-ValueContainer"
> >
<div <div
class=" css-1wa3eu0-placeholder" class=" css-1osw1h9-placeholder"
> >
Select... Select...
</div> </div>
<div <div
class="css-ybs8ec-Input" class="css-187dxxn-Input"
> >
<div <div
class="" class=""
@ -113,7 +113,7 @@ exports[`Select renders with props 1`] = `
> >
<div <div
aria-hidden="true" aria-hidden="true"
class=" css-1k7leo4-loadingIndicator" class=" css-1gilzap-loadingIndicator"
> >
<span <span
class="css-1yvy2vo-LoadingDot" class="css-1yvy2vo-LoadingDot"
@ -126,11 +126,11 @@ exports[`Select renders with props 1`] = `
/> />
</div> </div>
<span <span
class=" css-bqiiy2-indicatorSeparator" class=" css-1urf5ax-indicatorSeparator"
/> />
<div <div
aria-hidden="true" aria-hidden="true"
class=" css-kaqmzc-indicatorContainer" class=" css-aazq4s-indicatorContainer"
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
@ -151,7 +151,7 @@ exports[`Select renders with props 1`] = `
`; `;
exports[`Select should select another option 1`] = ` exports[`Select should select another option 1`] = `
<ThemedComponent(Component) <WithTheme(Component)
onInputChange={ onInputChange={
[MockFunction] { [MockFunction] {
"calls": Array [ "calls": Array [
@ -187,6 +187,42 @@ exports[`Select should select another option 1`] = `
] ]
} }
> >
<Component
onInputChange={
[MockFunction] {
"calls": Array [
Array [
"two",
Object {
"action": "input-change",
},
],
],
"results": Array [
Object {
"type": "return",
"value": undefined,
},
],
}
}
options={
Array [
Object {
"label": "One",
"value": "one",
},
Object {
"label": "Two",
"value": "two",
},
Object {
"label": "One hundred",
"value": "hundred",
},
]
}
>
<Select <Select
onInputChange={ onInputChange={
[MockFunction] { [MockFunction] {
@ -455,8 +491,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -600,8 +636,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -629,7 +665,7 @@ exports[`Select should select another option 1`] = `
"flexWrap": "wrap", "flexWrap": "wrap",
"justifyContent": "space-between", "justifyContent": "space-between",
"label": "control", "label": "control",
"minHeight": 38, "minHeight": 30,
"outline": "0 !important", "outline": "0 !important",
"position": "relative", "position": "relative",
"transition": "all 100ms", "transition": "all 100ms",
@ -639,7 +675,7 @@ exports[`Select should select another option 1`] = `
onTouchEnd={[Function]} onTouchEnd={[Function]}
> >
<div <div
className=" css-1960ht7-control" className=" css-vmgz7k-control"
onMouseDown={[Function]} onMouseDown={[Function]}
onTouchEnd={[Function]} onTouchEnd={[Function]}
> >
@ -753,8 +789,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -773,13 +809,13 @@ exports[`Select should select another option 1`] = `
"flex": 1, "flex": 1,
"flexWrap": "wrap", "flexWrap": "wrap",
"overflow": "hidden", "overflow": "hidden",
"padding": "2px 8px", "padding": "1px 4px",
"position": "relative", "position": "relative",
} }
} }
> >
<div <div
className=" css-g1d714-ValueContainer" className=" css-be27w2-ValueContainer"
> >
<Input <Input
aria-autocomplete="list" aria-autocomplete="list"
@ -880,8 +916,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -896,15 +932,15 @@ exports[`Select should select another option 1`] = `
Object { Object {
"boxSizing": "border-box", "boxSizing": "border-box",
"color": undefined, "color": undefined,
"margin": 2, "margin": 1,
"paddingBottom": 2, "paddingBottom": 1,
"paddingTop": 2, "paddingTop": 1,
"visibility": "visible", "visibility": "visible",
} }
} }
> >
<div <div
className="css-ybs8ec-Input" className="css-187dxxn-Input"
> >
<AutosizeInput <AutosizeInput
aria-autocomplete="list" aria-autocomplete="list"
@ -1107,8 +1143,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -1242,8 +1278,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -1259,14 +1295,14 @@ exports[`Select should select another option 1`] = `
"backgroundColor": undefined, "backgroundColor": undefined,
"boxSizing": "border-box", "boxSizing": "border-box",
"label": "indicatorSeparator", "label": "indicatorSeparator",
"marginBottom": 8, "marginBottom": 4,
"marginTop": 8, "marginTop": 4,
"width": 1, "width": 1,
} }
} }
> >
<span <span
className=" css-bqiiy2-indicatorSeparator" className=" css-1urf5ax-indicatorSeparator"
/> />
</EmotionCssPropInternal> </EmotionCssPropInternal>
</IndicatorSeparator> </IndicatorSeparator>
@ -1388,8 +1424,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -1409,7 +1445,7 @@ exports[`Select should select another option 1`] = `
"color": undefined, "color": undefined,
"display": "flex", "display": "flex",
"label": "indicatorContainer", "label": "indicatorContainer",
"padding": 8, "padding": 4,
"transition": "color 150ms", "transition": "color 150ms",
} }
} }
@ -1418,7 +1454,7 @@ exports[`Select should select another option 1`] = `
> >
<div <div
aria-hidden="true" aria-hidden="true"
className=" css-kaqmzc-indicatorContainer" className=" css-aazq4s-indicatorContainer"
onMouseDown={[Function]} onMouseDown={[Function]}
onTouchEnd={[Function]} onTouchEnd={[Function]}
> >
@ -1580,8 +1616,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -1710,8 +1746,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -1862,8 +1898,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -1879,14 +1915,14 @@ exports[`Select should select another option 1`] = `
"boxSizing": "border-box", "boxSizing": "border-box",
"maxHeight": 300, "maxHeight": 300,
"overflowY": "auto", "overflowY": "auto",
"paddingBottom": 4, "paddingBottom": 2,
"paddingTop": 4, "paddingTop": 2,
"position": "relative", "position": "relative",
} }
} }
> >
<div <div
className=" css-4ljt47-MenuList" className=" css-87spde-MenuList"
> >
<Option <Option
clearValue={[Function]} clearValue={[Function]}
@ -2018,8 +2054,8 @@ exports[`Select should select another option 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -2044,7 +2080,7 @@ exports[`Select should select another option 1`] = `
"display": "block", "display": "block",
"fontSize": "inherit", "fontSize": "inherit",
"label": "option", "label": "option",
"padding": "8px 12px", "padding": "4px 6px",
"userSelect": "none", "userSelect": "none",
"width": "100%", "width": "100%",
} }
@ -2056,7 +2092,7 @@ exports[`Select should select another option 1`] = `
tabIndex={-1} tabIndex={-1}
> >
<div <div
className=" css-1gm74v5-option" className=" css-1npzjqc-option"
id="react-select-4-option-1" id="react-select-4-option-1"
onClick={[Function]} onClick={[Function]}
onMouseMove={[Function]} onMouseMove={[Function]}
@ -2082,11 +2118,12 @@ exports[`Select should select another option 1`] = `
</Select> </Select>
</StateManager> </StateManager>
</Select> </Select>
</ThemedComponent(Component)> </Component>
</WithTheme(Component)>
`; `;
exports[`Select shouldn't find any results 1`] = ` exports[`Select shouldn't find any results 1`] = `
<ThemedComponent(Component) <WithTheme(Component)
onChange={[MockFunction]} onChange={[MockFunction]}
options={ options={
Array [ Array [
@ -2105,6 +2142,25 @@ exports[`Select shouldn't find any results 1`] = `
] ]
} }
> >
<Component
onChange={[MockFunction]}
options={
Array [
Object {
"label": "One",
"value": "one",
},
Object {
"label": "Two",
"value": "two",
},
Object {
"label": "One hundred",
"value": "hundred",
},
]
}
>
<Select <Select
onChange={[MockFunction]} onChange={[MockFunction]}
options={ options={
@ -2339,8 +2395,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -2484,8 +2540,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -2513,7 +2569,7 @@ exports[`Select shouldn't find any results 1`] = `
"flexWrap": "wrap", "flexWrap": "wrap",
"justifyContent": "space-between", "justifyContent": "space-between",
"label": "control", "label": "control",
"minHeight": 38, "minHeight": 30,
"outline": "0 !important", "outline": "0 !important",
"position": "relative", "position": "relative",
"transition": "all 100ms", "transition": "all 100ms",
@ -2523,7 +2579,7 @@ exports[`Select shouldn't find any results 1`] = `
onTouchEnd={[Function]} onTouchEnd={[Function]}
> >
<div <div
className=" css-1960ht7-control" className=" css-vmgz7k-control"
onMouseDown={[Function]} onMouseDown={[Function]}
onTouchEnd={[Function]} onTouchEnd={[Function]}
> >
@ -2637,8 +2693,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -2657,13 +2713,13 @@ exports[`Select shouldn't find any results 1`] = `
"flex": 1, "flex": 1,
"flexWrap": "wrap", "flexWrap": "wrap",
"overflow": "hidden", "overflow": "hidden",
"padding": "2px 8px", "padding": "1px 4px",
"position": "relative", "position": "relative",
} }
} }
> >
<div <div
className=" css-g1d714-ValueContainer" className=" css-be27w2-ValueContainer"
> >
<Input <Input
aria-autocomplete="list" aria-autocomplete="list"
@ -2764,8 +2820,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -2780,15 +2836,15 @@ exports[`Select shouldn't find any results 1`] = `
Object { Object {
"boxSizing": "border-box", "boxSizing": "border-box",
"color": undefined, "color": undefined,
"margin": 2, "margin": 1,
"paddingBottom": 2, "paddingBottom": 1,
"paddingTop": 2, "paddingTop": 1,
"visibility": "visible", "visibility": "visible",
} }
} }
> >
<div <div
className="css-ybs8ec-Input" className="css-187dxxn-Input"
> >
<AutosizeInput <AutosizeInput
aria-autocomplete="list" aria-autocomplete="list"
@ -2991,8 +3047,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3126,8 +3182,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3143,14 +3199,14 @@ exports[`Select shouldn't find any results 1`] = `
"backgroundColor": undefined, "backgroundColor": undefined,
"boxSizing": "border-box", "boxSizing": "border-box",
"label": "indicatorSeparator", "label": "indicatorSeparator",
"marginBottom": 8, "marginBottom": 4,
"marginTop": 8, "marginTop": 4,
"width": 1, "width": 1,
} }
} }
> >
<span <span
className=" css-bqiiy2-indicatorSeparator" className=" css-1urf5ax-indicatorSeparator"
/> />
</EmotionCssPropInternal> </EmotionCssPropInternal>
</IndicatorSeparator> </IndicatorSeparator>
@ -3272,8 +3328,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3293,7 +3349,7 @@ exports[`Select shouldn't find any results 1`] = `
"color": undefined, "color": undefined,
"display": "flex", "display": "flex",
"label": "indicatorContainer", "label": "indicatorContainer",
"padding": 8, "padding": 4,
"transition": "color 150ms", "transition": "color 150ms",
} }
} }
@ -3302,7 +3358,7 @@ exports[`Select shouldn't find any results 1`] = `
> >
<div <div
aria-hidden="true" aria-hidden="true"
className=" css-kaqmzc-indicatorContainer" className=" css-aazq4s-indicatorContainer"
onMouseDown={[Function]} onMouseDown={[Function]}
onTouchEnd={[Function]} onTouchEnd={[Function]}
> >
@ -3464,8 +3520,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3594,8 +3650,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3746,8 +3802,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3763,14 +3819,14 @@ exports[`Select shouldn't find any results 1`] = `
"boxSizing": "border-box", "boxSizing": "border-box",
"maxHeight": 300, "maxHeight": 300,
"overflowY": "auto", "overflowY": "auto",
"paddingBottom": 4, "paddingBottom": 2,
"paddingTop": 4, "paddingTop": 2,
"position": "relative", "position": "relative",
} }
} }
> >
<div <div
className=" css-4ljt47-MenuList" className=" css-87spde-MenuList"
> >
<NoOptionsMessage <NoOptionsMessage
clearValue={[Function]} clearValue={[Function]}
@ -3881,8 +3937,8 @@ exports[`Select shouldn't find any results 1`] = `
"primary75": "#4C9AFF", "primary75": "#4C9AFF",
}, },
"spacing": Object { "spacing": Object {
"baseUnit": 4, "baseUnit": 2,
"controlHeight": 38, "controlHeight": 30,
"menuGutter": 8, "menuGutter": 8,
}, },
} }
@ -3896,13 +3952,13 @@ exports[`Select shouldn't find any results 1`] = `
Object { Object {
"boxSizing": "border-box", "boxSizing": "border-box",
"color": undefined, "color": undefined,
"padding": "8px 12px", "padding": "4px 6px",
"textAlign": "center", "textAlign": "center",
} }
} }
> >
<div <div
className=" css-mzubzw-NoOptionsMessage" className=" css-36co7-NoOptionsMessage"
> >
No options No options
</div> </div>
@ -3923,5 +3979,6 @@ exports[`Select shouldn't find any results 1`] = `
</Select> </Select>
</StateManager> </StateManager>
</Select> </Select>
</ThemedComponent(Component)> </Component>
</WithTheme(Component)>
`; `;

View File

@ -1,5 +1,4 @@
import React, { PureComponent, Component, ReactNode } from 'react'; import React, { PureComponent, Component, ReactNode } from 'react';
import PropTypes from 'prop-types';
import { stringify } from 'javascript-stringify'; import { stringify } from 'javascript-stringify';
import objectPath from 'object-path'; import objectPath from 'object-path';
import jsan from 'jsan'; import jsan from 'jsan';

View File

@ -130,14 +130,15 @@ export default class TestTab<S, A extends Action<unknown>> extends Component<
return ( return (
<Container> <Container>
<Toolbar> <Toolbar>
<div style={{ flexGrow: 1, zIndex: 100 }}>
<Select <Select
options={templates} options={templates}
valueKey="name" getOptionValue={(template: Template) => template.name}
labelKey="name" getOptionLabel={(template: Template) => template.name}
value={name} value={templates.filter((template) => template.name === name)}
simpleValue={false}
onChange={this.handleSelectTemplate} onChange={this.handleSelectTemplate}
/> />
</div>
<Button onClick={this.editTemplate}> <Button onClick={this.editTemplate}>
<MdEdit /> <MdEdit />
</Button> </Button>

View File

@ -9357,7 +9357,7 @@ hmac-drbg@^1.0.0:
minimalistic-assert "^1.0.0" minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1" minimalistic-crypto-utils "^1.0.1"
hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0:
version "3.3.2" version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==