Skip to content

Commit

Permalink
docs: 组件文档中显示出 disabledPortal 和 container api (#2924)
Browse files Browse the repository at this point in the history
* docs: 组件文档中显示出 disabledPortal 和 container api

* chore: 去掉示例调试代码
  • Loading branch information
zyprepare authored Jul 3, 2024
1 parent 3621112 commit a227f4b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
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

0 comments on commit a227f4b

Please sign in to comment.