File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
apps/website/src/routes/docs/headless/(components)/tooltip
packages/kit-headless/src/components/tooltip Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { APITable } from '../../../../../components/api-table/api-table';
10
10
11
11
# Tooltip
12
12
13
- #### A popup that displays information realted to an element when the element receives keyboard focus or the mouse hovers over it.
13
+ #### A tooltip that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.
14
14
15
15
<MainExample >
16
16
``` tsx
@@ -41,7 +41,7 @@ import { APITable } from '../../../../../components/api-table/api-table';
41
41
42
42
## Examples
43
43
44
- ### EXAMPLE: Describing Unlabelled Icon Link
44
+ ### EXAMPLE: Describing Icon with Tooltip
45
45
46
46
<Example1 >
47
47
``` tsx
@@ -72,7 +72,7 @@ import { APITable } from '../../../../../components/api-table/api-table';
72
72
73
73
## API
74
74
75
- ### AccordionItem
75
+ ### Tooltip
76
76
77
77
<APITable
78
78
propDescriptors = { [
@@ -88,7 +88,7 @@ import { APITable } from '../../../../../components/api-table/api-table';
88
88
},
89
89
{
90
90
name: ' durationMs' ,
91
- type: ' nummber ' ,
91
+ type: ' number ' ,
92
92
description:
93
93
' Sets a delay duration in milliseconds before the Tooltip is displayed.' ,
94
94
},
Original file line number Diff line number Diff line change
1
+ import { component$ } from '@builder.io/qwik' ;
2
+ import { Tooltip } from './tooltip' ;
3
+
4
+ const TooltipComponent = component$ ( ( ) => {
5
+ return < Tooltip content = "tooltip message" > Please hover me</ Tooltip > ;
6
+ } ) ;
7
+
8
+ describe ( 'Tooltip' , ( ) => {
9
+ it ( 'INIT' , ( ) => {
10
+ cy . mount ( < TooltipComponent /> ) ;
11
+
12
+ cy . checkA11yForComponent ( ) ;
13
+ } ) ;
14
+ it ( 'should render the component' , ( ) => {
15
+ cy . mount ( < TooltipComponent /> ) ;
16
+
17
+ cy . findByRole ( 'tooltip' ) . should ( 'contain' , 'tooltip message' ) ;
18
+ } ) ;
19
+ } ) ;
You can’t perform that action at this time.
0 commit comments