Open juniorbatistadev opened 4 years ago
The documentation show I can do this: < Dante content ={null} tooltips ={[DanteInlineTooltipConfig()]}
< 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
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 | }`
please tell us which version of dante are you using and check the tooltips.mdx file for documentation
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:
`
And this is the error I'm getting: