Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Trying to configure tooltips is not very clear #215

Open
juniorbatistadev opened this issue Apr 12, 2020 · 1 comment
Open

Trying to configure tooltips is not very clear #215

juniorbatistadev opened this issue Apr 12, 2020 · 1 comment

Comments

@juniorbatistadev
Copy link

The documentation show I can do this:
< Dante content ={null} tooltips ={[DanteInlineTooltipConfig()]}

But It's doesn't clarify where to import DanteInlineToolTipConfig from.

I assumed I should export it from like this
import { DanteInlineTooltipConfig } from "Dante2/package/es/components/popovers/addButton.js

This is my React Component:

import React from "react";
import FlexColumn from "../../components/common/FlexColumn";
import Title from "../../components/common/Title";
import Dante from "Dante2";
import { DanteInlineTooltipConfig } from "Dante2/package/es/components/popovers/addButton.js";
import styles from "./index.module.css";

function PostPage() {
  return (
    <FlexColumn margin="10px">
      <Title text="Crear Post" />
      <Dante
        tooltips={[DanteInlineTooltipConfig({ widget_options: { aa: "oo" } })]}
      />
    </FlexColumn>
  );
}

export default PostPage;
```
`

And this is the error I'm getting: 
```
`TypeError: this.props.item.icon is not a function
InlineTooltipItem.render
  356 |     style: {
  357 |       fontSize: '21px'
  358 |     }
 359 |   }, React.createElement("span", {
      | ^  360 |     className: 'tooltip-icon'
  361 |   }, this.props.item.icon()));
  362 | }`
```
@michelson
Copy link
Owner

please tell us which version of dante are you using and check the tooltips.mdx file for documentation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants