Skip to content

Commit

Permalink
chore(ui): Add Action demo with tooltip and popconfirm
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Dec 19, 2024
1 parent e1ce421 commit 874a227
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
29 changes: 29 additions & 0 deletions packages/ui/src/Action/demo/with-tooltip-popconfirm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import { Popconfirm, Space } from '@oceanbase/design';
import { Action } from '@oceanbase/ui';
import { DownOutlined } from '@oceanbase/icons';

export default () => {
return (
<Action.Group
moreText={
<Space size={4}>
更多
<DownOutlined />
</Space>
}
>
<Action.Button type="primary" tooltip="This is tooltip">
action1
</Action.Button>
<Popconfirm placement="bottom" title="Confirm to delete it?">
<Action.Button danger tooltip="This is tooltip">
危险按钮
</Action.Button>
</Popconfirm>
<Action.Button>action3</Action.Button>
<Action.Button>action4</Action.Button>
<Action.Button>action5</Action.Button>
</Action.Group>
);
};
6 changes: 2 additions & 4 deletions packages/ui/src/Action/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ nav:

## 代码演示

<!-- prettier-ignore -->
<code src="./demo/link.tsx" title="Action.Link"></code>

<code src="./demo/button.tsx" title="Action.Button"></code>

<code src="./demo/loading.tsx" title="loading 状态"></code>

<code src="./demo/with-tooltip-popconfirm.tsx" title="带 Tooltip 和 Popconfirm"></code>
<code src="./demo/fixed.tsx" title="固定展示、不被折叠的 Action"></code>

<code src="./demo/groupControl.tsx" title="整体控制状态"></code>

## API
Expand Down

0 comments on commit 874a227

Please sign in to comment.