mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2024-11-21 03:15:49 +08:00
chore: use the constants as the component names
This commit is contained in:
parent
bc2b9ae154
commit
d8dc5d4a6e
@ -3,7 +3,7 @@ import { implementRuntimeComponent } from '../../utils/buildKit';
|
|||||||
import { Type } from '@sinclair/typebox';
|
import { Type } from '@sinclair/typebox';
|
||||||
import { partial } from 'lodash-es';
|
import { partial } from 'lodash-es';
|
||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { CORE_VERSION } from '@sunmao-ui/shared';
|
import { CORE_VERSION, GRID_LAYOUT_COMPONENT_NAME } from '@sunmao-ui/shared';
|
||||||
|
|
||||||
const BaseGridLayout = React.lazy(() => import('../_internal/GridLayout'));
|
const BaseGridLayout = React.lazy(() => import('../_internal/GridLayout'));
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ const PropsSpec = Type.Object({
|
|||||||
export default implementRuntimeComponent({
|
export default implementRuntimeComponent({
|
||||||
version: CORE_VERSION,
|
version: CORE_VERSION,
|
||||||
metadata: {
|
metadata: {
|
||||||
name: 'grid_layout',
|
name: GRID_LAYOUT_COMPONENT_NAME,
|
||||||
displayName: 'Grid Layout',
|
displayName: 'Grid Layout',
|
||||||
description: 'drag and drop to layout in a grid',
|
description: 'drag and drop to layout in a grid',
|
||||||
isDraggable: true,
|
isDraggable: true,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { implementRuntimeComponent } from '../../utils/buildKit';
|
import { implementRuntimeComponent } from '../../utils/buildKit';
|
||||||
import { ModuleSpec, CORE_VERSION } from '@sunmao-ui/shared';
|
import { ModuleSpec, CORE_VERSION, MODULE_CONTAINER_COMPONENT_NAME } from '@sunmao-ui/shared';
|
||||||
import { ModuleRenderer } from '../_internal/ModuleRenderer';
|
import { ModuleRenderer } from '../_internal/ModuleRenderer';
|
||||||
|
|
||||||
export default implementRuntimeComponent({
|
export default implementRuntimeComponent({
|
||||||
version: CORE_VERSION,
|
version: CORE_VERSION,
|
||||||
metadata: {
|
metadata: {
|
||||||
name: 'moduleContainer',
|
name: MODULE_CONTAINER_COMPONENT_NAME,
|
||||||
displayName: 'ModuleContainer',
|
displayName: 'ModuleContainer',
|
||||||
description: 'ModuleContainer component',
|
description: 'ModuleContainer component',
|
||||||
isDraggable: true,
|
isDraggable: true,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Type } from '@sinclair/typebox';
|
import { Type } from '@sinclair/typebox';
|
||||||
import _Text, { TextPropertySpec } from '../_internal/Text';
|
import _Text, { TextPropertySpec } from '../_internal/Text';
|
||||||
import { implementRuntimeComponent } from '../../utils/buildKit';
|
import { implementRuntimeComponent } from '../../utils/buildKit';
|
||||||
import { CORE_VERSION } from '@sunmao-ui/shared';
|
import { CORE_VERSION, TEXT_COMPONENT_NAME } from '@sunmao-ui/shared';
|
||||||
|
|
||||||
const StateSpec = Type.Object({
|
const StateSpec = Type.Object({
|
||||||
value: Type.String(),
|
value: Type.String(),
|
||||||
@ -14,7 +14,7 @@ const PropsSpec = Type.Object({
|
|||||||
export default implementRuntimeComponent({
|
export default implementRuntimeComponent({
|
||||||
version: CORE_VERSION,
|
version: CORE_VERSION,
|
||||||
metadata: {
|
metadata: {
|
||||||
name: 'text',
|
name: TEXT_COMPONENT_NAME,
|
||||||
displayName: 'Text',
|
displayName: 'Text',
|
||||||
description: 'support plain and markdown formats',
|
description: 'support plain and markdown formats',
|
||||||
isDraggable: true,
|
isDraggable: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user