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

docs: 组件文档中显示出 disabledPortal 和 container api #2924

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/giant-mirrors-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/preview": patch
---

chore: 添加 @hi-ui/watermark 依赖
3 changes: 1 addition & 2 deletions packages/ui/drawer/src/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ export interface DrawerProps extends Omit<HiBaseHTMLProps<'div'>, 'title'>, UseM
*/
timeout?: number
/**
* 禁用 portal。暂不对外暴露
* @private
* 禁用 portal
*/
disabledPortal?: boolean
/**
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/modal/src/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ export interface ModalProps extends HiBaseHTMLProps<'div'>, UseModalProps {
*/
showFooterDivider?: boolean
/**
* 禁用 portal。暂不对外暴露
* @private
* 禁用 portal
*/
disabledPortal?: boolean
/**
Expand Down
6 changes: 4 additions & 2 deletions packages/ui/number-input/src/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const _prefix = getPrefixCls('number-input')
/**
* 数字输入框
*/
export const NumberInput = forwardRef<HTMLDivElement | null, CounterProps>(
export const NumberInput = forwardRef<HTMLDivElement | null, NumberInputProps>(
({ prefixCls = _prefix, role = _role, prefix, ...rest }, ref) => {
const { rootProps, getInputProps, getMinusButtonProps, getPlusButtonProps } = useCounter({
prefixCls,
Expand All @@ -35,7 +35,9 @@ export const NumberInput = forwardRef<HTMLDivElement | null, CounterProps>(
}
)

export interface NumberInputProps extends CounterProps {}
export interface NumberInputProps extends CounterProps {
prefix?: React.ReactNode
}

if (__DEV__) {
NumberInput.displayName = 'NumberInput'
Expand Down
1 change: 1 addition & 0 deletions packages/ui/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@hi-ui/portal": "^4.0.8",
"@hi-ui/use-latest": "^4.0.4",
"@hi-ui/use-uncontrolled-state": "^4.0.4",
"@hi-ui/watermark": "^4.0.8",
"react-transition-group": "^4.4.2"
},
"peerDependencies": {
Expand Down
6 changes: 2 additions & 4 deletions packages/ui/tooltip/src/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,11 @@ export interface TooltipProps extends HiBaseHTMLProps<'div'>, UseTooltipProps {
*/
innerRef?: React.Ref<TooltipHelpers>
/**
* 指定 portal 的容器。暂不对外暴露
* @private
* 指定 portal 的容器
*/
container?: HTMLElement
/**
* 禁用 portal。暂不对外暴露
* @private
* 禁用 portal
*/
disabledPortal?: boolean
}
Expand Down