@aligov/pegasus
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

demo component

@aligov/pegasus

搭投组件

用法

import React, { useState } from "react";
import { Pegasus, createPegasusActions } from '@aligov/pegasus';

function Test() {
  const [loading, setLoading] = useState<boolean>(false);
  const actions = createPegasusActions();

  const onPublish = async () => {
    try {
      setLoading(true);
      await actions.page.publish('release');
    } catch (error) {
      console.error(error);
    } finally {
      setLoading(false);
    }
  };

  return (
    <div>
      <Button type="primary" loading={loading} onClick={onPublish}>
        <Icon type="add" />
        发布
      </Button>
      <Pegasus />
    </div>
  );
}

Readme

Keywords

Package Sidebar

Install

npm i @aligov/pegasus

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

9.09 MB

Total Files

1020

Last publish

Collaborators

  • jasoncapricorn
  • qingkaili
  • huguoxin
  • shenyu.wsy
  • liunian
  • tao1991123
  • itrip
  • xiazhiqiang
  • mo.zhou
  • guoliang.hgl
  • daip
  • baizhao