Skip to content

Commit

Permalink
Merge pull request #9 from FriedRiceNoodles/docs/tooltip
Browse files Browse the repository at this point in the history
docs(tooltip): updated demo and documentation of tooltip
  • Loading branch information
FriedRiceNoodles authored Feb 21, 2024
2 parents b9a6c25 + 68152c3 commit 85cc917
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/example/Tooltip/demos/placement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function Placement() {
display: inline-flex;
flex-direction: column;
gap: 8px;
--banana-tooltip-max-width: 80px;
}
.placement-row {
Expand Down
24 changes: 12 additions & 12 deletions docs/example/Tooltip/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ demo:

## 属性 - Attributes & Properties

| 属性 | 说明 | 类型 | 默认值 |
| --------------------------------------------------------------- | ------------------------------- | -------------------- | ------- |
| content | 提示内容 | `boolean` | '' |
| placement | 弹出位置 | `Placement` | 'top' |
| disableAutoAdjustOverflow <br /> (disable-auto-adjust-overflow) | 禁用自动调整弹出位置 | `boolean` | false |
| maxWidth <br /> (max-width) | 气泡的最大宽度 | `number \| string ` | - |
| backgroundColor <br /> (background-color) | 气泡的背景颜色 | `string` | - |
| margin | 气泡与触发元素(trigger)的距离 | `number` | 8 |
| mouseEnterDelay <br /> (mouse-enter-delay) | 鼠标移入后延时多少才显示 | `number` | 100 |
| mouseLeaveDelay <br /> (mouse-leave-delay) | 鼠标移出后延时多少才隐藏 | `number` | 100 |
| triggerAction <br /> (trigger-action) | 触发行为 | `'hover' \| 'click'` | 'hover' |
| noArrow | 是否隐藏箭头 | `boolean` | false |
| 属性 | 说明 | 类型 | 默认值 |
| --------------------------------------------------------------- | ------------------------------- | -------------------- | --------------------- |
| content | 提示内容 | `boolean` | '' |
| placement | 弹出位置 | `Placement` | 'top' |
| disableAutoAdjustOverflow <br /> (disable-auto-adjust-overflow) | 禁用自动调整弹出位置 | `boolean` | false |
| maxWidth <br /> (max-width) | 气泡的最大宽度 | `number \| string ` | '300px' |
| backgroundColor <br /> (background-color) | 气泡的背景颜色 | `string` | 'rgba(46, 50 ,56, 1)' |
| margin | 气泡与触发元素(trigger)的距离 | `number` | 8 |
| mouseEnterDelay <br /> (mouse-enter-delay) | 鼠标移入后延时多少才显示 | `number` | 100 |
| mouseLeaveDelay <br /> (mouse-leave-delay) | 鼠标移出后延时多少才隐藏 | `number` | 100 |
| triggerAction <br /> (trigger-action) | 触发行为 | `'hover' \| 'click'` | 'hover' |
| noArrow | 是否隐藏箭头 | `boolean` | false |

```typescript
export type Placement =
Expand Down

0 comments on commit 85cc917

Please sign in to comment.