This component library is pure ESM.
Install via npm:
$ npm install @ant-design/pro-editor
Install via pnpm:
$ pnpm add @ant-design/pro-editor
import { SmileOutlined } from '@ant-design/icons';
import { ActionIcon } from '@ant-design/pro-editor';
export default () => (
<ActionIcon
title={'Function button description'}
icon={<SmileOutlined />}
onClick={() => {
alert('Trigger action');
}}
/>
);
To adapt to nextjs's SSR mode, you need to add the relevant dependencies of this package to the transpilePackages
configuration in next.config.js
:
// next.config.js
const nextConfig = {
// ...other config
transpilePackages: ['@ant-design/pro-editor', 'leva'],
};
$ git clone [email protected]:ant-design/pro-editor.git
$ cd pro-editor
$ npm install
$ npm start
Open your browser and visit http://localhost:8000
📊 Total: 7
Copyright © 2023 - present AFX & Ant Digital
This project is MIT licensed.