Skip to content

Commit

Permalink
fix: add builtin imageSetter
Browse files Browse the repository at this point in the history
  • Loading branch information
wwsun committed Jun 20, 2024
1 parent 6ddd06a commit 7861aa5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions apps/storybook/src/setting-form.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ const prototypeHasBasicProps: IComponentPrototype = {
title: 'textAreaSetter',
setter: 'textAreaSetter',
},
{
name: 'src',
title: 'imageSetter',
setter: 'imageSetter',
},
{
name: 'number',
title: 'numberSetter',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { CodeSetter } from './code-setter';
import { BoolSetter } from './bool-setter';
import { IdSetter } from './id-setter';
Expand Down Expand Up @@ -36,6 +37,10 @@ const BASIC_SETTERS: IFormItemCreateOptions[] = [
name: 'idSetter',
component: IdSetter,
},
{
name: 'imageSetter',
render: (props) => <TextSetter placeholder="请提供图片地址" {...props} />,
},
];

let registered = false;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/collapse-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Box, HTMLCoralProps, css } from 'coral-system';
import { CaretRightOutlined, UpOutlined } from '@ant-design/icons';
import { CaretRightOutlined } from '@ant-design/icons';
import { useControllableState } from '@music163/tango-helpers';

export interface CollapsePanelProps extends Omit<HTMLCoralProps<'div'>, 'title'> {
Expand Down

0 comments on commit 7861aa5

Please sign in to comment.