This commit is contained in:
NikolayRechkin 2019-11-25 11:51:02 +03:00
commit 0a4af8e8b0
3 changed files with 12 additions and 8 deletions

View File

@ -22,6 +22,6 @@ import { FieldContainer } from "asc-web-components";
| `isRequired` | `bool` | - | - | `false` | Indicates that the field is required to fill |
| `hasError` | `bool` | - | - | `false` | Indicates that the field is incorrect |
| `labelText` | `string` | - | - | - | Field label text |
| `tooltipContent` | `object`,`string` | | - | - | Tooltip content |
| `tooltipContent` | `object`,`string` | - | - | - | Tooltip content |
| `HelpButtonHeaderContent` | `string` | - | - | - | Tooltip header content (tooltip opened in aside) |
| `horLabelWidth` | `string` | - | - | `110px` | Label width in horizontal alignment |

View File

@ -28,6 +28,7 @@ storiesOf("Components|FieldContainer", module)
labelText={text("labelText", "Name:")}
horLabelWidth={text("horLabelWidth", "110px")}
tooltipContent={text("tooltipContent", "Paste you tooltip content here")}
HelpButtonHeaderContent={text("HelpButtonHeaderContent", "Tooltip header")}
place="top"
>
<TextInput

View File

@ -156,6 +156,8 @@ class HelpButton extends React.Component {
<Backdrop onClick={this.onClose} visible={isOpen} zIndex={zIndex} />
<Aside visible={isOpen} scale={false} zIndex={zIndex}>
<Content>
{
HelpButtonHeaderContent &&
<Header>
<HeaderText>
<Text.Body isBold={true} fontSize={21}>
@ -163,6 +165,7 @@ class HelpButton extends React.Component {
</Text.Body>
</HeaderText>
</Header>
}
<Body>{tooltipContent}</Body>
</Content>
</Aside>