redux-connected-devtools 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.env +1 -1
  2. package/package.json +26 -12
  3. package/src/components/DevInspector/DevInspector.style.tsx +0 -1
  4. package/src/components/DevList/DevList.tsx +5 -2
  5. package/src/components/DevMenu/DevMenu.style.tsx +9 -6
  6. package/src/components/DevMenu/DevMenu.tsx +2 -1
  7. package/src/components/DevPanel/DevPanel.style.tsx +9 -0
  8. package/src/components/DevPanel/DevPanel.tsx +12 -5
  9. package/src/components/DevtoolsApp/DevtoolsApp.scss +2 -0
  10. package/src/components/DevtoolsApp/DevtoolsApp.style.tsx +12 -0
  11. package/src/components/DevtoolsApp/DevtoolsApp.tsx +45 -0
  12. package/src/components/Icon/AllIcons.tsx +66 -0
  13. package/src/components/Icon/Icon.scss +2 -0
  14. package/src/components/Icon/Icon.style.tsx +11 -0
  15. package/src/components/Icon/Icon.tsx +28 -0
  16. package/src/components/JourneyRow/JourneyRow.style.tsx +2 -2
  17. package/src/components/JourneyRow/JourneyRow.tsx +2 -0
  18. package/src/components/JsonViewer/JsonViewer.tsx +0 -1
  19. package/src/components/Lifecycle/Lifecycle.tsx +6 -1
  20. package/src/components/RequestDetails/RequestDetails.style.tsx +1 -1
  21. package/src/components/RequestJourney/RequestJourney.style.tsx +21 -0
  22. package/src/components/RequestRow/RequestRow.style.tsx +1 -0
  23. package/src/components/RequestRow/RequestRow.tsx +3 -3
  24. package/src/components/Size/Size.scss +2 -0
  25. package/src/components/Size/Size.style.tsx +6 -0
  26. package/src/components/Size/Size.tsx +21 -0
  27. package/src/components/StateViewer/StateViewer.scss +2 -0
  28. package/src/components/StateViewer/StateViewer.style.tsx +5 -0
  29. package/src/components/StateViewer/StateViewer.tsx +17 -0
  30. package/src/components/Time/Time.style.tsx +1 -1
  31. package/src/containers/DevPanelContainer.tsx +5 -3
  32. package/src/containers/DevtoolsAppContainer.tsx +42 -0
  33. package/src/containers/JsonViewerContainer.tsx +8 -0
  34. package/src/containers/LifecycleContainer.tsx +12 -0
  35. package/src/containers/LifecycleFailedContainer.tsx +11 -0
  36. package/src/containers/LogsViewerContainer.tsx +8 -0
  37. package/src/containers/StateViewerContainer.tsx +8 -0
  38. package/src/data/devComponents.tsx +2 -0
  39. package/src/data/devRouter.ts +107 -0
  40. package/src/data/devRoutes.ts +20 -13
  41. package/src/hooks/useStoreSize.ts +27 -0
  42. package/src/index.ts +1 -1
  43. package/src/store/selectors.ts +49 -34
  44. package/src/types.ts +1 -1
  45. package/src/utils/date.ts +9 -1
  46. package/src/utils/download.ts +17 -0
  47. package/tsconfig.json +13 -19
  48. package/vite.config.ts +21 -39
  49. package/.vscode/settings.json +0 -12
  50. package/.vscode/tasks.json +0 -33
  51. package/public/devtools.html +0 -8
  52. package/public/icon.png +0 -0
  53. package/public/manifest.json +0 -29
  54. package/public/options.html +0 -12
  55. package/public/panel.html +0 -39
  56. package/public/popup.html +0 -12
  57. package/src/background.ts +0 -49
  58. package/src/content_script.ts +0 -19
  59. package/src/devtools.tsx +0 -29
  60. package/src/injected_script.ts +0 -9
  61. package/src/options.tsx +0 -77
  62. package/src/panel.tsx +0 -30
  63. package/src/popup.tsx +0 -63
  64. package/src/sum.ts +0 -3
  65. package/webpack/webpack.common.js +0 -46
  66. package/webpack/webpack.dev.js +0 -7
  67. package/webpack/webpack.prod.js +0 -6
package/.env CHANGED
@@ -1,2 +1,2 @@
1
1
  VITE_SERVER_DOMAIN=http://localhost
2
- VITE_BASE_PORT_PAYEM=3100
2
+ VITE_BASE_PORT_GLI=3100
package/package.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "name": "redux-connected-devtools",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "redux-connected-devtools",
5
- "main": "src/index.ts",
6
5
  "scripts": {
7
6
  "dev": "vite",
8
7
  "watch": "webpack --config webpack/webpack.dev.js --watch",
9
- "build": "webpack --config webpack/webpack.prod.js",
8
+ "build": "vite build & tsc",
10
9
  "clean": "rimraf dist",
11
10
  "test": "npx jest",
12
11
  "style": "prettier --write \"src/**/*.{ts,tsx}\""
@@ -20,39 +19,54 @@
20
19
  "dependencies": {
21
20
  "@redux-devtools/extension": "^3.2.2",
22
21
  "bytes": "^3.1.2",
22
+ "classnames": "^2.3.2",
23
23
  "dotenv-flow": "^3.2.0",
24
- "react": "^17.0.1",
25
- "react-dom": "^17.0.2",
26
24
  "react-redux": "^7.2.6",
27
- "react-window": "^1.8.6",
28
- "redux-connected": "^0.0.90",
29
- "redux-store-generator": "^0.9.74",
25
+ "react-window": "^1.8.8",
26
+ "redux-connected": "^0.0.103",
27
+ "redux-store-generator": "^0.9.89",
30
28
  "reselect": "^4.1.5",
29
+ "rollup-plugin-analyzer": "^4.0.0",
30
+ "shared-base": "^0.0.27",
31
31
  "styled-components": "^5.3.3",
32
32
  "tslib": "^2.3.1"
33
33
  },
34
+ "peerDependencies": {
35
+ "react": "^18.2.0",
36
+ "react-dom": "^18.2.0"
37
+ },
34
38
  "devDependencies": {
35
- "@types/bytes": "^3.1.1",
36
39
  "@types/chrome": "0.0.158",
37
40
  "@types/jest": "^27.0.2",
38
41
  "@types/react": "^17.0.0",
39
42
  "@types/react-dom": "^17.0.0",
40
- "@types/react-window": "^1.8.5",
41
43
  "@types/styled-components": "^5.1.24",
42
44
  "@vitejs/plugin-react": "^1.2.0",
43
45
  "copy-webpack-plugin": "^9.0.1",
44
46
  "glob": "^7.1.6",
45
47
  "jest": "^27.2.1",
46
48
  "prettier": "^2.2.1",
49
+ "react": "^18.2.0",
50
+ "react-dom": "^18.2.0",
47
51
  "rimraf": "^3.0.2 ",
48
52
  "ts-jest": "^27.0.5",
49
53
  "ts-loader": "^8.0.0",
50
- "typescript": "^4.4.3 ",
54
+ "typescript": "^4.5.5",
51
55
  "vite": "^2.6.4",
52
- "vite-plugin-react-svg": "^0.2.0",
56
+ "vite-plugin-dts": "^1.7.1",
57
+ "vite-plugin-react-svg": "^0.1.0",
53
58
  "vite-tsconfig-paths": "^3.3.13",
54
59
  "webpack": "^5.0.0",
55
60
  "webpack-cli": "^4.0.0",
56
61
  "webpack-merge": "^5.0.0"
62
+ },
63
+ "main": "./dist/redux-connected-devtools.umd.js",
64
+ "module": "./dist/redux-connected-devtools.es.js",
65
+ "types": "./dist/dts/index.d.ts",
66
+ "exports": {
67
+ ".": {
68
+ "import": "./dist/redux-connected-devtools.es.js",
69
+ "require": "./dist/redux-connected-devtools.umd.js"
70
+ }
57
71
  }
58
72
  }
@@ -4,5 +4,4 @@ export const Container = styled.div`
4
4
  flex: 1;
5
5
  display: flex;
6
6
  flex-direction: column;
7
- background-color: rgba(0, 0, 0, 0.1);
8
7
  `;
@@ -1,25 +1,28 @@
1
1
  import React from 'react';
2
2
  import { Container, Empty } from './DevList.style';
3
3
  import { FixedSizeList as List } from 'react-window';
4
- import { Json } from '../../types';
4
+ import classnames from 'classnames';
5
5
 
6
6
  export type DevListProps = {
7
7
  items: Json[];
8
8
  row: React.FC<any>;
9
+ selectedRow: any;
9
10
  onClick: (item: any) => void;
10
11
  };
11
12
 
12
13
  export function DevList(props: DevListProps) {
13
- const { row: Cmp, items } = props;
14
+ const { row: Cmp, items, selectedRow } = props;
14
15
 
15
16
  const Item = (rowInfo: any) => {
16
17
  const { index, style } = rowInfo;
17
18
 
18
19
  const item = items[index];
20
+ const className = classnames({ selected: item.id === selectedRow?.id });
19
21
 
20
22
  return (
21
23
  <Cmp
22
24
  onClick={props.onClick}
25
+ className={className}
23
26
  index={index}
24
27
  style={style}
25
28
  item={item}
@@ -2,7 +2,7 @@ import styled from 'styled-components';
2
2
 
3
3
  export const Container = styled.div`
4
4
  width: 190px;
5
- border-right: 1px solid rgba(255, 255, 255, 0.2);
5
+ ${(props) => props.theme.borderRight('1px solid rgba(255, 255, 255, 0.2)')}
6
6
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
7
7
  `;
8
8
 
@@ -18,16 +18,19 @@ export const MenuGroupTitle = styled.div`
18
18
  background-color: rgba(0, 0, 0, 0.1);
19
19
  `;
20
20
 
21
- export const MenuItem = styled.div<{ selected: boolean }>`
21
+ export const MenuItem = styled.div`
22
22
  display: flex;
23
23
  flex-direction: row;
24
24
  align-items: center;
25
25
  padding: 6px 10px;
26
26
  font-size: 14px;
27
- color: ${(props) =>
28
- props.selected ? 'gold' : 'rgba(255, 255, 255, 0.89)'};
29
- background-color: ${(props) =>
30
- props.selected ? 'rgba(255, 255, 255, 0.05)' : 'transparent'};
27
+ color: rgba(255, 255, 255, 0.89);
28
+ background-color: transparent;
29
+
30
+ &.selected {
31
+ color: gold;
32
+ background-color: rgba(255, 255, 255, 0.05);
33
+ }
31
34
 
32
35
  &:hover {
33
36
  background-color: rgba(255, 255, 255, 0.1);
@@ -9,6 +9,7 @@ import {
9
9
  Badge,
10
10
  BadgeTotal,
11
11
  } from './DevMenu.style';
12
+ import classnames from 'classnames';
12
13
 
13
14
  export type DevMenuProps = {
14
15
  groups: string[];
@@ -31,8 +32,8 @@ export function DevMenu(props: DevMenuProps) {
31
32
 
32
33
  return (
33
34
  <MenuItem
34
- selected={selected}
35
35
  key={item.id}
36
+ className={classnames({ selected })}
36
37
  onClick={() => props.onClick(item)}
37
38
  >
38
39
  <Title>{title}</Title>
@@ -14,3 +14,12 @@ export const Content = styled.div`
14
14
  display: flex;
15
15
  flex-direction: column;
16
16
  `;
17
+
18
+ export const Actions = styled.div`
19
+ position: absolute;
20
+ bottom: 5px;
21
+ ${(props) => props.theme.left('10px')}
22
+ display: flex;
23
+ flex-direction: row;
24
+ align-items: center;
25
+ `;
@@ -1,11 +1,12 @@
1
1
  import DevMenu from '../../containers/DevMenuContainer';
2
2
  import React, { useState } from 'react';
3
- import { Container, Content } from './DevPanel.style';
3
+ import { Actions, Container, Content } from './DevPanel.style';
4
4
  import { devComponents } from '../../data/devComponents';
5
- import { devGroups, devRoutes, IDevRoute } from '../../data/devRoutes';
6
- import { Json } from '../../types';
5
+ import { devRoutes, IDevRoute } from '../../data/devRoutes';
7
6
 
8
- export type DevPanelProps = {};
7
+ export type DevPanelProps = {
8
+ children: JSX.Element | JSX.Element[];
9
+ };
9
10
 
10
11
  export function DevPanel(props: DevPanelProps) {
11
12
  const [route, setRoute] = useState<IDevRoute>(devRoutes[0]);
@@ -24,11 +25,16 @@ export function DevPanel(props: DevPanelProps) {
24
25
  selectedId={route.id}
25
26
  onClick={(item: IDevRoute) => setRoute(item)}
26
27
  />
28
+ <Actions>{props.children}</Actions>
27
29
  <Content>{renderRoute()}</Content>
28
30
  </Container>
29
31
  );
30
32
  }
31
33
 
34
+ /*
35
+ for the chrome extension devtools panel
36
+ TODO: find another way to encapsulate this
37
+
32
38
  let bgConnection;
33
39
 
34
40
  function init(id: string) {
@@ -44,8 +50,9 @@ function init(id: string) {
44
50
  }
45
51
 
46
52
  if (chrome) {
47
- const tabId = String(chrome.devtools?.inspectedWindow.tabId || '');
53
+ const tabId = String(chrome.devtools?.inspectedWindow.tabId ?? '');
48
54
  init(tabId);
49
55
  }
56
+ */
50
57
 
51
58
  export default DevPanel;
@@ -0,0 +1,2 @@
1
+ .DevtoolsApp-container {
2
+ }
@@ -0,0 +1,12 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ background-color: #223;
6
+ z-index: 3;
7
+ color: #eee;
8
+ display: flex;
9
+ flex-direction: column;
10
+ min-width: 880px;
11
+ min-height: 880px;
12
+ `;
@@ -0,0 +1,45 @@
1
+ import Icon from '../Icon/Icon';
2
+ import React, { useRef } from 'react';
3
+ import { Container } from './DevtoolsApp.style';
4
+ import { DevPanelContainer } from '../../containers/DevPanelContainer';
5
+ import { Provider } from 'react-redux';
6
+ import Size from '../Size/Size';
7
+ import classnames from 'classnames';
8
+
9
+ export type DevtoolsAppProps = {
10
+ connectedStore: any;
11
+ clearRequests: () => void;
12
+ downloadState: () => void;
13
+ storeSizeInBytes?: number;
14
+ isDarkMode?: boolean;
15
+ };
16
+
17
+ export function DevtoolsApp(props: DevtoolsAppProps) {
18
+ const { connectedStore, storeSizeInBytes, isDarkMode } = props;
19
+ const ref = useRef(null);
20
+
21
+ const className = classnames('DevtoolsApp-container', {
22
+ darkMode: isDarkMode,
23
+ });
24
+
25
+ return (
26
+ <Container
27
+ ref={ref}
28
+ className={className}
29
+ data-testid='DevtoolsApp-container'
30
+ >
31
+ <Provider store={connectedStore}>
32
+ <DevPanelContainer>
33
+ <Size size={storeSizeInBytes} />
34
+ <Icon
35
+ name='clearAll'
36
+ onClick={() => props.clearRequests()}
37
+ />
38
+ <Icon name='download' onClick={props.downloadState} />
39
+ </DevPanelContainer>
40
+ </Provider>
41
+ </Container>
42
+ );
43
+ }
44
+
45
+ export default DevtoolsApp;
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+
3
+ export type IconName = 'download' | 'close' | 'clearAll';
4
+
5
+ type IconProps = {
6
+ size?: number;
7
+ };
8
+
9
+ const Download = (props: IconProps) => {
10
+ const { size = 24 } = props;
11
+
12
+ return (
13
+ <svg
14
+ xmlns='http://www.w3.org/2000/svg'
15
+ viewBox='0 0 24 24'
16
+ width={`${size}px`}
17
+ height={`${size}px`}
18
+ fill='currentColor'
19
+ >
20
+ <path d='M0 0h24v24H0z' fill='none' />
21
+ <path d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z' />
22
+ </svg>
23
+ );
24
+ };
25
+
26
+ const Close = (props: IconProps) => {
27
+ const { size = 24 } = props;
28
+
29
+ return (
30
+ <svg
31
+ xmlns='http://www.w3.org/2000/svg'
32
+ viewBox='0 0 24 24'
33
+ width={`${size}px`}
34
+ height={`${size}px`}
35
+ fill='currentColor'
36
+ >
37
+ <path d='M0 0h24v24H0z' fill='none' />
38
+ <path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z' />
39
+ </svg>
40
+ );
41
+ };
42
+
43
+ const ClearAll = (props: IconProps) => {
44
+ const { size = 24 } = props;
45
+
46
+ return (
47
+ <svg
48
+ xmlns='http://www.w3.org/2000/svg'
49
+ viewBox='0 0 24 24'
50
+ width={`${size}px`}
51
+ height={`${size}px`}
52
+ fill='currentColor'
53
+ >
54
+ <path d='M0 0h24v24H0z' fill='none' />
55
+ <path d='M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z' />
56
+ </svg>
57
+ );
58
+ };
59
+
60
+ type Icons = Record<IconName, React.FC<IconProps>>;
61
+
62
+ export const allIcons: Icons = {
63
+ close: Close,
64
+ clearAll: ClearAll,
65
+ download: Download,
66
+ };
@@ -0,0 +1,2 @@
1
+ .Icon-container {
2
+ }
@@ -0,0 +1,11 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div<{ color?: string }>`
4
+ margin: 0 3px;
5
+ color: ${(props) => props.color ?? 'inherit'};
6
+ cursor: pointer;
7
+
8
+ &:hover {
9
+ color: gold;
10
+ }
11
+ `;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { allIcons, IconName } from './AllIcons';
3
+ import { Container } from './Icon.style';
4
+
5
+ export type IconProps = {
6
+ name: IconName;
7
+ color?: string;
8
+ size?: number;
9
+ onClick?: () => void;
10
+ };
11
+
12
+ export function Icon(props: IconProps) {
13
+ const { name, size = 20, color } = props;
14
+ const Cmp = allIcons[name];
15
+
16
+ return (
17
+ <Container
18
+ className='Icon-container'
19
+ data-testid='Icon-container'
20
+ color={color}
21
+ onClick={props.onClick}
22
+ >
23
+ <Cmp size={size} />
24
+ </Container>
25
+ );
26
+ }
27
+
28
+ export default Icon;
@@ -28,7 +28,7 @@ export const DataIcon = styled.div`
28
28
  font-weight: bold;
29
29
  color: purple;
30
30
  border-radius: 5px;
31
- margin-left: 10px;
31
+ ${(props) => props.theme.marginLeft('10px')}
32
32
  `;
33
33
 
34
34
  export const Delta = styled.div`
@@ -36,7 +36,7 @@ export const Delta = styled.div`
36
36
  width: 60px;
37
37
  font-weight: bold;
38
38
  color: olive;
39
- margin-right: 10px;
39
+ ${(props) => props.theme.marginRight('10px')}
40
40
  text-align: center;
41
41
  font-family: monospace;
42
42
  `;
@@ -9,11 +9,13 @@ export type JourneyRowProps = {
9
9
 
10
10
  const statusMap: Record<LifecycleStatus, string> = {
11
11
  [LifecycleStatus.RECEIVED]: 'Received',
12
+ [LifecycleStatus.POST_ACTION_OPTIMISTIC]: 'Post action (optimistic)',
12
13
  [LifecycleStatus.IN_QUEUE]: 'In queue',
13
14
  [LifecycleStatus.GENERAL_ERROR]: 'General error',
14
15
  [LifecycleStatus.PENDING_API_RESPONSE]: 'Pending API',
15
16
  [LifecycleStatus.API_ERROR]: 'API error',
16
17
  [LifecycleStatus.POST_ACTION]: 'Post action',
18
+ [LifecycleStatus.FAILED]: 'Failed',
17
19
  };
18
20
 
19
21
  export function JourneyRow(props: JourneyRowProps) {
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { Json } from '../../types';
3
2
  import { Container } from './JsonViewer.style';
4
3
 
5
4
  export type JsonViewerProps = {
@@ -22,7 +22,12 @@ export function Lifecycle(props: LifecycleProps) {
22
22
  className='Lifecycle-container'
23
23
  data-testid='Lifecycle-container'
24
24
  >
25
- <DevList items={requests} row={RequestRow} onClick={onClick} />
25
+ <DevList
26
+ items={requests}
27
+ row={RequestRow}
28
+ onClick={onClick}
29
+ selectedRow={item}
30
+ />
26
31
  <DevInspector item={item} />
27
32
  </Container>
28
33
  );
@@ -15,6 +15,6 @@ export const Td = styled.td`
15
15
  &:first-child {
16
16
  color: #778;
17
17
  text-align: right;
18
- padding-right: 10px;
18
+ ${(props) => props.theme.paddingRight('10px')}
19
19
  }
20
20
  `;
@@ -3,4 +3,25 @@ import styled from 'styled-components';
3
3
  export const Container = styled.div`
4
4
  flex: 1;
5
5
  border-top: 1px solid #333;
6
+ max-height: 380px;
7
+ overflow-y: scroll;
8
+
9
+ &::-webkit-scrollbar {
10
+ width: 8px;
11
+ }
12
+
13
+ /* Track */
14
+ &::-webkit-scrollbar-track {
15
+ background: #333;
16
+ }
17
+
18
+ /* Handle */
19
+ &::-webkit-scrollbar-thumb {
20
+ background: #555;
21
+ }
22
+
23
+ /* Handle on hover */
24
+ &::-webkit-scrollbar-thumb:hover {
25
+ background: #666;
26
+ }
6
27
  `;
@@ -6,6 +6,7 @@ export const Container = styled.div<{ index: number }>`
6
6
  flex-direction: row;
7
7
  align-items: center;
8
8
  padding: 10px;
9
+ max-width: 90%;
9
10
  background-color: ${(props) =>
10
11
  props.index % 2 === 1 ? 'rgba(0, 0, 0, 0.2)' : 'transparent'};
11
12
 
@@ -1,23 +1,23 @@
1
1
  import React from 'react';
2
2
  import { Container, Col, Id, Type } from './RequestRow.style';
3
3
  import Time from '../Time/Time';
4
- import { Json } from '../../types';
5
4
  import { ApiRequest } from 'redux-connected';
6
5
 
7
6
  export type RequestRowProps = {
8
7
  style: Json;
9
8
  item: ApiRequest;
10
9
  index: number;
10
+ className?: string;
11
11
  onClick: (item: ApiRequest) => void;
12
12
  };
13
13
 
14
14
  export function RequestRow(props: RequestRowProps) {
15
- const { index, style, item } = props;
15
+ const { index, style, item, className } = props;
16
16
  const { sequence, createdTS } = item;
17
17
 
18
18
  return (
19
19
  <Container
20
- className='DevListRow-container'
20
+ className={`DevListRow-container ${className}`}
21
21
  data-testid='DevListRow-container'
22
22
  style={style}
23
23
  index={index}
@@ -0,0 +1,2 @@
1
+ .Size-container {
2
+ }
@@ -0,0 +1,6 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ color: olive;
5
+ margin: 0 5px;
6
+ `;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { Container } from './Size.style';
3
+ import bytes from 'bytes';
4
+ import { useMemo } from 'react';
5
+
6
+ export type SizeProps = {
7
+ size?: number;
8
+ };
9
+
10
+ export function Size(props: SizeProps) {
11
+ const { size = 0 } = props;
12
+ const sizeText = useMemo(() => bytes(size), [size]);
13
+
14
+ return (
15
+ <Container className='Size-container' data-testid='Size-container'>
16
+ {!size ? '-' : sizeText}
17
+ </Container>
18
+ );
19
+ }
20
+
21
+ export default Size;
@@ -0,0 +1,2 @@
1
+ .StateViewer-container {
2
+ }
@@ -0,0 +1,5 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const Container = styled.div`
4
+ flex: 1;
5
+ `;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Container } from './StateViewer.style';
3
+
4
+ export type StateViewerProps = {};
5
+
6
+ export function StateViewer(_props: StateViewerProps) {
7
+ return (
8
+ <Container
9
+ className='StateViewer-container'
10
+ data-testid='StateViewer-container'
11
+ >
12
+ StateViewer
13
+ </Container>
14
+ );
15
+ }
16
+
17
+ export default StateViewer;
@@ -1,11 +1,11 @@
1
1
  import styled from 'styled-components';
2
2
 
3
3
  export const Container = styled.div`
4
- color: yellowgreen;
5
4
  display: flex;
6
5
  flex-direction: row;
7
6
  align-items: flex-start;
8
7
  font-family: monospace;
8
+ color: #99a;
9
9
  `;
10
10
 
11
11
  export const Full = styled.div`
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import DevPanel from '../components/DevPanel/DevPanel';
3
3
 
4
- type DevPanelProps = {};
4
+ type DevPanelProps = {
5
+ children: JSX.Element | JSX.Element[];
6
+ };
5
7
 
6
- export function DevPanelContainer(_props: DevPanelProps) {
7
- return <DevPanel />;
8
+ export function DevPanelContainer(props: DevPanelProps) {
9
+ return <DevPanel>{props.children}</DevPanel>;
8
10
  }
9
11
 
10
12
  export default DevPanelContainer;