From 13eeae95d768ff67162cff00c109c9ef644c36ad Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 3 Sep 2020 23:35:25 -0400 Subject: [PATCH] Fix --- .../devui/src/utils/createThemedComponent.js | 4 +- .../tests/__snapshots__/Select.test.js.snap | 4088 +++++++++++++++-- 2 files changed, 3698 insertions(+), 394 deletions(-) diff --git a/packages/devui/src/utils/createThemedComponent.js b/packages/devui/src/utils/createThemedComponent.js index 060ebea5..019c4035 100644 --- a/packages/devui/src/utils/createThemedComponent.js +++ b/packages/devui/src/utils/createThemedComponent.js @@ -3,11 +3,11 @@ import getDefaultTheme from '../themes/default'; import { withTheme } from 'styled-components'; export default (UnthemedComponent) => (props) => - props.theme.type ? ( + props.theme && props.theme.type ? ( withTheme() ) : ( // used outside of container (theme provider) - + ); // TODO: memoize it? diff --git a/packages/devui/tests/__snapshots__/Select.test.js.snap b/packages/devui/tests/__snapshots__/Select.test.js.snap index b1cf980a..65eeb048 100644 --- a/packages/devui/tests/__snapshots__/Select.test.js.snap +++ b/packages/devui/tests/__snapshots__/Select.test.js.snap @@ -2,112 +2,156 @@ exports[`Select renders correctly 1`] = `
Select...
-
+ class="" + style="display:inline-block" + > + +
+
- - + +
`; exports[`Select renders with props 1`] = `
- - One - -   - - + Select...
-
`; exports[`Select should select another option 1`] = ` - -
-
-
- -
- -
- two -
-
-
-
- - - -
-
-
-
-
- - - + +
+ + +
+ + +
+ +
+ +
+ two +
+
+
+
+
+ +
+
+
+ + +
+ + + + + + + + +
+
+
+
+
+ + + + +
+ + + + +
+ +
+
+
+
+
+
+
+
+
+
+ + + + + + `; exports[`Select shouldn't find any results 1`] = ` - -
-
-
- -
- -
+
+ + +
+ + +
+ +
+ +
+ text +
+
+
+
+
+ +
+
+
+ + +
+ + + + + + + + +
+
+
+
+ + + + - text -
-
-
-
- - - -
-
-
-
- No results found + +
+ + + + +
+ + +
+ No options +
+
+
+
+
+
+
+
+
+
+ +
-
-
-
- - - + + + + + + `;