mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-15 14:31:09 +08:00

* Add FAQ entry for Toolkit + custom component * Add tooltip example for custom component * Add link to example in Tooltip doc page * Add link to issue Co-authored-by: afc163 <afc163@gmail.com> Signed-off-by: Dan M. <danspamable@gmail.com> * Replace custom props with HTMLSpanElement props Co-authored-by: afc163 <afc163@gmail.com> Signed-off-by: Dan M. <danspamable@gmail.com> * Import handlers as types Co-authored-by: afc163 <afc163@gmail.com> Signed-off-by: Dan M. <danspamable@gmail.com> * Fix formatting Co-authored-by: afc163 <afc163@gmail.com> Signed-off-by: Dan M. <danspamable@gmail.com> * Update components/tooltip/demo/wrap-custom-component.tsx Co-authored-by: afc163 <afc163@gmail.com> Signed-off-by: Dan M. <danspamable@gmail.com> * Update components/tooltip/index.en-US.md Co-authored-by: afc163 <afc163@gmail.com> Signed-off-by: Dan M. <danspamable@gmail.com> * Add link for Wrap Custom Component * Update components/tooltip/demo/wrap-custom-component.tsx Signed-off-by: thinkasany <480968828@qq.com> * test: update snap * fix md lint * chore: update docs --------- Signed-off-by: Dan M. <danspamable@gmail.com> Signed-off-by: thinkasany <480968828@qq.com> Co-authored-by: afc163 <afc163@gmail.com> Co-authored-by: thinkasany <480968828@qq.com> Co-authored-by: 𝑾𝒖𝒙𝒉 <wxh1220@gmail.com>
15 lines
374 B
TypeScript
15 lines
374 B
TypeScript
import { Tooltip } from 'antd';
|
|
import React from 'react';
|
|
|
|
const ComponentWithEvents: React.FC<React.HTMLAttributes<HTMLSpanElement>> = (props) => (
|
|
<span {...props}>This text is inside a component with the necessary events exposed.</span>
|
|
);
|
|
|
|
const App: React.FC = () => (
|
|
<Tooltip title="prompt text">
|
|
<ComponentWithEvents />
|
|
</Tooltip>
|
|
);
|
|
|
|
export default App;
|