@hbtv/style-input
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

@hbtv/style-editor

安装方法

yarn add @hbtv/style-editor@latest

使用方法

import { Form, Card } from 'antd';
import StyleInput, { StyleEditor } from './index';

const UsageInput = () => {
  const [form] = Form.useForm();
  // 可以使用form 各种方法
  return (
    <Form form={form}>
      <Form.Item name="style" label="样式">
        <StyleInput />
      </Form.Item>
    </Form>
  );
}

API

// 适用于 FormItem 的 StyleInput
export interface StyleInputProps {
  allowStyle?: string[]; // 允许的样式 background | flex | font | border | sizePosition
  style?: CSSProperties; // 额外样式
  uploadServices?: ServicesType; // 上传服务
  value?: CSSProperties; // 值
  onChange?: (newValue: any) => void; // onChange时间
}

Readme

Keywords

none

Package Sidebar

Install

npm i @hbtv/style-input

Weekly Downloads

0

Version

1.0.11

License

MIT

Unpacked Size

66.7 kB

Total Files

18

Last publish

Collaborators

  • gegang
  • zix2002
  • yugong
  • dokey
  • gogoing
  • xuezhidp
  • aa719032411