Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(modals): add modal component #268

Merged
merged 7 commits into from
Sep 23, 2023
Merged

feat(modals): add modal component #268

merged 7 commits into from
Sep 23, 2023

Conversation

AlphaGHX
Copy link
Contributor

@AlphaGHX AlphaGHX commented Sep 22, 2023

新增 modal 组件

  • 弃用 querySelector 获取元素,使用 forward ref 转发元素,让父组件可以完整的操控 dialog 元素
  • title 插槽,可以自定义 title 区域,空值则只显示关闭按钮
  • action 插槽,可以自定义 action 区域,空值则不显示 action 区域

@kunish
Copy link
Collaborator

kunish commented Sep 22, 2023

src/constants/index.ts 里的 MODAL 枚举可以废弃掉了

src/components/Modal.tsx Outdated Show resolved Hide resolved
src/pages/Logs.tsx Outdated Show resolved Hide resolved
@kunish
Copy link
Collaborator

kunish commented Sep 23, 2023

有时间处理一下冲突,就差不多了

Signed-off-by: Alpha <61853980+AlphaGHX@users.noreply.github.com>
Copy link
Collaborator

@kunish kunish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kunish kunish merged commit eca9a16 into MetaCubeX:main Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants