11/* eslint-disable jsx-a11y/no-static-element-interactions */
22/* eslint-disable jsx-a11y/click-events-have-key-events */
33import { TooltipController as Tooltip } from 'components/TooltipController'
4- import { IPosition , TooltipRefProps } from 'components/Tooltip/TooltipTypes.d'
5- import React , { useEffect , useRef , useState } from 'react'
4+ import type { IPosition , TooltipRefProps } from 'components/Tooltip/TooltipTypes.d'
5+ import type React from 'react'
6+ import { useEffect , useRef , useState } from 'react'
67import { inline , offset } from '@floating-ui/dom'
78import styles from './styles.module.css'
89
@@ -81,13 +82,15 @@ function App() {
8182 < p >
8283 < button
8384 id = "button2"
85+ type = "button"
8486 data-tooltip-content = "Hello World from a Tooltip 2"
8587 onClick = { handleButtonClick }
8688 >
8789 Hover or focus me
8890 </ button >
8991 < button
9092 id = "button3"
93+ type = "button"
9194 data-tooltip-content = "Hello World from a Tooltip 3"
9295 onClick = { handleButtonClick }
9396 >
@@ -97,11 +100,19 @@ function App() {
97100 </ section >
98101 < section id = "section-anchor-select" style = { { marginTop : '100px' } } >
99102 < p >
100- < button data-tooltip-id = "anchor-select" data-tooltip-content = "this content is different" >
103+ < button
104+ type = "button"
105+ data-tooltip-id = "anchor-select"
106+ data-tooltip-content = "this content is different"
107+ >
101108 Anchor select
102109 </ button >
103- < button data-tooltip-id = "anchor-select" > Anchor select 2</ button >
104- < button data-tooltip-id = "anchor-select" > Anchor select 3</ button >
110+ < button type = "button" type = "button" data-tooltip-id = "anchor-select" >
111+ Anchor select 2
112+ </ button >
113+ < button type = "button" type = "button" data-tooltip-id = "anchor-select" >
114+ Anchor select 3
115+ </ button >
105116 </ p >
106117 < Tooltip id = "anchor-select" > Tooltip content</ Tooltip >
107118 < Tooltip
@@ -163,6 +174,7 @@ function App() {
163174 />
164175 </ div >
165176 < button
177+ type = "button"
166178 id = "imperativeTooltipButton"
167179 style = { { height : 40 , marginLeft : 100 } }
168180 onClick = { ( ) => {
@@ -184,7 +196,9 @@ function App() {
184196 </ div >
185197
186198 < div style = { { marginTop : '1rem' } } >
187- < button id = "buttonCallbacks" > Check the dev console</ button >
199+ < button type = "button" id = "buttonCallbacks" >
200+ Check the dev console
201+ </ button >
188202 < Tooltip
189203 place = "bottom"
190204 anchorSelect = "#buttonCallbacks"
@@ -195,7 +209,9 @@ function App() {
195209 content = "Showing tooltip and calling afterShow method"
196210 />
197211
198- < button id = "buttonCallbacksClick" > With click event</ button >
212+ < button type = "button" id = "buttonCallbacksClick" >
213+ With click event
214+ </ button >
199215 < Tooltip
200216 openOnClick
201217 place = "bottom"
@@ -207,7 +223,9 @@ function App() {
207223 content = "Showing tooltip and calling afterShow method"
208224 />
209225
210- < button id = "buttonCallbacksDelay" > With delay</ button >
226+ < button type = "button" id = "buttonCallbacksDelay" >
227+ With delay
228+ </ button >
211229 < Tooltip
212230 delayShow = { 1000 }
213231 place = "bottom"
0 commit comments