// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import type { TooltipProps } from "@coreai-ds/react-components";
import type { JSXElement } from "@coreai-ds/react-components";
import * as React from 'react';
import { Tooltip } from "@coreai-ds/react-components";
import { Button } from "@coreai-ds/react-components";
import { SlideTextRegular } from "@fluentui/react-icons";

export const CustomMount = (props: Partial<TooltipProps>): JSXElement => {
    const [ref, setRef] = React.useState<HTMLElement | null>();
    return (<>
      <Tooltip mountNode={ref} content="Example tooltip" relationship="label" {...props}>
        <Button icon={<SlideTextRegular />} size="large"/>
      </Tooltip>
      <div ref={setRef}/>
    </>);
};

export default CustomMount;
