@xyo-network/react-embed 2.69.0 → 2.69.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/components/controls/ListModeSelect.d.cts +3 -3
- package/dist/browser/components/controls/ListModeSelect.d.cts.map +1 -1
- package/dist/browser/components/controls/ListModeSelect.d.mts +3 -3
- package/dist/browser/components/controls/ListModeSelect.d.mts.map +1 -1
- package/dist/browser/components/controls/ListModeSelect.d.ts +3 -3
- package/dist/browser/components/controls/ListModeSelect.d.ts.map +1 -1
- package/dist/browser/components/controls/RenderSelect.d.cts +2 -2
- package/dist/browser/components/controls/RenderSelect.d.cts.map +1 -1
- package/dist/browser/components/controls/RenderSelect.d.mts +2 -2
- package/dist/browser/components/controls/RenderSelect.d.mts.map +1 -1
- package/dist/browser/components/controls/RenderSelect.d.ts +2 -2
- package/dist/browser/components/controls/RenderSelect.d.ts.map +1 -1
- package/dist/browser/index.cjs +4 -2
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +6 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/node/components/controls/ListModeSelect.d.cts +3 -3
- package/dist/node/components/controls/ListModeSelect.d.cts.map +1 -1
- package/dist/node/components/controls/ListModeSelect.d.mts +3 -3
- package/dist/node/components/controls/ListModeSelect.d.mts.map +1 -1
- package/dist/node/components/controls/ListModeSelect.d.ts +3 -3
- package/dist/node/components/controls/ListModeSelect.d.ts.map +1 -1
- package/dist/node/components/controls/RenderSelect.d.cts +2 -2
- package/dist/node/components/controls/RenderSelect.d.cts.map +1 -1
- package/dist/node/components/controls/RenderSelect.d.mts +2 -2
- package/dist/node/components/controls/RenderSelect.d.mts.map +1 -1
- package/dist/node/components/controls/RenderSelect.d.ts +2 -2
- package/dist/node/components/controls/RenderSelect.d.ts.map +1 -1
- package/dist/node/index.cjs +4 -2
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +6 -4
- package/dist/node/index.js.map +1 -1
- package/package.json +14 -14
- package/src/components/controls/ListModeSelect.tsx +6 -5
- package/src/components/controls/RenderSelect.tsx +5 -4
@@ -1,4 +1,5 @@
|
|
1
|
-
import { MenuItem
|
1
|
+
import { MenuItem } from '@mui/material'
|
2
|
+
import { SelectEx, SelectExProps } from '@xylabs/react-select'
|
2
3
|
import { ListMode, useListMode } from '@xyo-network/react-shared'
|
3
4
|
|
4
5
|
import { EmbedFormControl } from './EmbedFormControl'
|
@@ -6,11 +7,11 @@ import { EmbedFormControl } from './EmbedFormControl'
|
|
6
7
|
const listModeSelectId = 'listmode-select-id'
|
7
8
|
const listModeSelectLabel = 'List Mode'
|
8
9
|
|
9
|
-
export const ListModeSelect: React.FC<
|
10
|
+
export const ListModeSelect: React.FC<SelectExProps<ListMode>> = (props) => {
|
10
11
|
const { listMode, setListMode } = useListMode()
|
11
12
|
|
12
13
|
return (
|
13
|
-
<
|
14
|
+
<SelectEx<ListMode>
|
14
15
|
value={(listMode ?? 'default') as ListMode}
|
15
16
|
onChange={(event) => {
|
16
17
|
setListMode?.(event.target.value as ListMode)
|
@@ -26,11 +27,11 @@ export const ListModeSelect: React.FC<SelectProps<ListMode>> = (props) => {
|
|
26
27
|
<MenuItem key="grid" value="grid">
|
27
28
|
Grid
|
28
29
|
</MenuItem>
|
29
|
-
</
|
30
|
+
</SelectEx>
|
30
31
|
)
|
31
32
|
}
|
32
33
|
|
33
|
-
export const ListModeSelectFormControl: React.FC<
|
34
|
+
export const ListModeSelectFormControl: React.FC<SelectExProps<ListMode>> = (props) => {
|
34
35
|
return (
|
35
36
|
<EmbedFormControl formId={listModeSelectId} formLabel={listModeSelectLabel}>
|
36
37
|
<ListModeSelect size="small" label={listModeSelectLabel} labelId={listModeSelectId} {...props} />
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { MenuItem
|
1
|
+
import { MenuItem } from '@mui/material'
|
2
|
+
import { SelectEx, SelectExProps } from '@xylabs/react-select'
|
2
3
|
|
3
4
|
import { useEmbedPluginState } from '../../contexts'
|
4
5
|
import { EmbedFormControl } from './EmbedFormControl'
|
@@ -6,17 +7,17 @@ import { EmbedFormControl } from './EmbedFormControl'
|
|
6
7
|
const renderSelectId = 'render-select-id'
|
7
8
|
const renderSelectLabel = 'Renderer'
|
8
9
|
|
9
|
-
export const EmbedRenderSelect: React.FC<
|
10
|
+
export const EmbedRenderSelect: React.FC<SelectExProps<string>> = (props) => {
|
10
11
|
const { activePlugin, setActivePlugin, plugins } = useEmbedPluginState()
|
11
12
|
return (
|
12
13
|
<EmbedFormControl formId={renderSelectId} formLabel={renderSelectLabel}>
|
13
|
-
<
|
14
|
+
<SelectEx size="small" value={activePlugin?.name} {...props}>
|
14
15
|
{plugins?.map((plugin) => (
|
15
16
|
<MenuItem value={plugin.name} key={plugin.name} onClick={() => setActivePlugin?.(plugin)}>
|
16
17
|
{plugin.name}
|
17
18
|
</MenuItem>
|
18
19
|
))}
|
19
|
-
</
|
20
|
+
</SelectEx>
|
20
21
|
</EmbedFormControl>
|
21
22
|
)
|
22
23
|
}
|