Web: Components: fixed tooltip docs
This commit is contained in:
parent
fe6f9e07eb
commit
ae70d0b274
@ -1,4 +1,10 @@
|
||||
import { Story, ArgsTable, Canvas, Meta } from "@storybook/addon-docs/blocks";
|
||||
import {
|
||||
Story,
|
||||
ArgsTable,
|
||||
Canvas,
|
||||
Meta,
|
||||
Controls,
|
||||
} from "@storybook/addon-docs/blocks";
|
||||
import * as stories from "./tooltip.stories.js";
|
||||
|
||||
import Tooltip from "./";
|
||||
@ -19,12 +25,6 @@ Custom tooltip
|
||||
|
||||
#### See documentation: https://github.com/wwayne/react-tooltip
|
||||
|
||||
<Canvas>
|
||||
<Story story={stories.basic} name="Default" />
|
||||
</Canvas>
|
||||
|
||||
<ArgsTable story="Default" />
|
||||
|
||||
<Canvas>
|
||||
<Story story={stories.all} name="All" />
|
||||
</Canvas>
|
||||
@ -123,12 +123,6 @@ const arrayUsers = [
|
||||
/>
|
||||
```
|
||||
|
||||
### YouComponent Properties
|
||||
### Properties
|
||||
|
||||
| Props | Type | Required | Values | Default | Description |
|
||||
| ------------- | :------: | :------: | :------------------------------: | :-----: | --------------------------------- |
|
||||
| `data-event` | `string` | - | `click, focus` | - | Custom event to trigger tooltip |
|
||||
| `data-for` | `string` | ✅ | - | - | Corresponds to the id of Tooltip |
|
||||
| `data-offset` | `string` | - | `top`, `left`, `right`, `bottom` | - | Offset of current tooltip |
|
||||
| `data-place` | `string` | - | `top`, `right`, `bottom`, `left` | - | Tooltip placement |
|
||||
| `data-tip` | `string` | - | - | - | Required if you need to component |
|
||||
<Controls />
|
||||
|
@ -2,10 +2,16 @@ import React from "react";
|
||||
import Link from "../link";
|
||||
import Text from "../text";
|
||||
import Tooltip from "./";
|
||||
import TooltipDocs from "./tooltip.mdx";
|
||||
|
||||
export default {
|
||||
title: "Components/Tooltip",
|
||||
component: Tooltip,
|
||||
parameters: {
|
||||
docs: {
|
||||
page: TooltipDocs,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const BodyStyle = { marginTop: 100, marginLeft: 200, position: "absolute" };
|
||||
|
Loading…
Reference in New Issue
Block a user