chore: use the constants as the component names

This commit is contained in:
MrWindlike 2022-04-25 16:38:08 +08:00
parent bc2b9ae154
commit d8dc5d4a6e
3 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ import { implementRuntimeComponent } from '../../utils/buildKit';
import { Type } from '@sinclair/typebox';
import { partial } from 'lodash-es';
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'));
@ -37,7 +37,7 @@ const PropsSpec = Type.Object({
export default implementRuntimeComponent({
version: CORE_VERSION,
metadata: {
name: 'grid_layout',
name: GRID_LAYOUT_COMPONENT_NAME,
displayName: 'Grid Layout',
description: 'drag and drop to layout in a grid',
isDraggable: true,

View File

@ -1,11 +1,11 @@
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';
export default implementRuntimeComponent({
version: CORE_VERSION,
metadata: {
name: 'moduleContainer',
name: MODULE_CONTAINER_COMPONENT_NAME,
displayName: 'ModuleContainer',
description: 'ModuleContainer component',
isDraggable: true,

View File

@ -1,7 +1,7 @@
import { Type } from '@sinclair/typebox';
import _Text, { TextPropertySpec } from '../_internal/Text';
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({
value: Type.String(),
@ -14,7 +14,7 @@ const PropsSpec = Type.Object({
export default implementRuntimeComponent({
version: CORE_VERSION,
metadata: {
name: 'text',
name: TEXT_COMPONENT_NAME,
displayName: 'Text',
description: 'support plain and markdown formats',
isDraggable: true,