Web: Components: deleted optional fields from tooltip, update tooltip story, delete tooltip from label story.

This commit is contained in:
Nikita Gopienko 2019-10-18 09:41:26 +03:00
parent 1c158c0004
commit 00651b3199
3 changed files with 5 additions and 35 deletions

View File

@ -35,10 +35,3 @@ Component displays the field name in the form
| `truncate` | `bool` | - | - | false | Disables word wrapping |
| `htmlFor` | `string` | - | - | - | The field ID to which the label is attached |
| `text` | `string` | - | - | - | Text |
| `tooltipId` | `string` | - | - | - | Tooltip id |
| `tooltipEvent` | `string` | - | - | - | Tooltip event |
| `iconButton` | `string` | - | - | - | Tooltip icon button |

View File

@ -3,15 +3,12 @@ import { storiesOf } from "@storybook/react";
import withReadme from "storybook-readme/with-readme";
import Readme from "./README.md";
import Tooltip from "./";
import IconButton from "../icon-button";
import Section from "../../../.storybook/decorators/section";
import Link from "../link";
import { Text } from "../text";
const BodyStyle = { marginTop: 100, marginLeft: 50, position: "absolute" };
const headerStyle = { marginTop: 70, marginLeft: 15, position: "absolute" };
const BodyStyle_2 = { marginTop: 70, marginLeft: 200, position: "absolute" };
const BodyStyle_3 = { marginTop: 70, marginLeft: 400 };
const BodyStyle = { marginTop: 70, marginLeft: 50, position: "absolute" };
const BodyStyle_2 = { marginTop: 70, marginLeft: 250 };
const arrayUsers = [
{
@ -51,25 +48,7 @@ storiesOf("Components|Tooltip", module)
.add("all", () => {
return (
<Section>
<h5 style={headerStyle}>Click on me</h5>
<IconButton
data-for="tooltipContent"
data-tip="You tooltip content"
data-event="click focus"
isClickable={true}
size={13}
iconName="QuestionIcon"
style={BodyStyle}
/>
<Tooltip
id="tooltipContent"
effect="solid"
place="top"
maxWidth={320}
/>
<div style={BodyStyle_2}>
<div style={BodyStyle}>
<h5 style={{ marginLeft: -5 }}>Hover on me</h5>
<Link data-for="link" data-tip="Bob Johnston">
Bob Johnston
@ -87,7 +66,7 @@ storiesOf("Components|Tooltip", module)
</div>
</Tooltip>
<div style={BodyStyle_3}>
<div style={BodyStyle_2}>
<h5 style={{ marginLeft: -5 }}>Hover group</h5>
<Link data-for="group" data-tip={0}>
Bob

View File

@ -71,11 +71,9 @@ class Tooltip extends Component {
left: offsetLeft
}}
wrapper="div"
resizeHide={true}
scrollHide={true}
afterShow={afterShow}
isCapture={true}
afterHide={afterHide}
isCapture={true}
>
{children}
</ReactTooltip>