Skip to content

Commit 6eab574

Browse files
committed
feat(tooltip): enhance tooltip parameters and add new properties to stories
1 parent b45ba21 commit 6eab574

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

stories/tooltip.stories.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ defineComponents(
2222
const metadata: Meta<IgcTooltipComponent> = {
2323
title: 'Tooltip',
2424
component: 'igc-tooltip',
25-
parameters: { docs: { description: { component: '' } } },
25+
parameters: {
26+
docs: { description: { component: '' } },
27+
actions: {
28+
handles: ['igcOpening', 'igcOpened', 'igcClosing', 'igcClosed'],
29+
},
30+
},
2631
argTypes: {
2732
open: {
2833
type: 'boolean',
@@ -90,13 +95,32 @@ const metadata: Meta<IgcTooltipComponent> = {
9095
'Which event triggers will hide the tooltip.\nExpects a comma separate string of different event triggers.',
9196
control: 'text',
9297
},
98+
showDelay: {
99+
type: 'number',
100+
description:
101+
'Specifies the number of milliseconds that should pass before showing the tooltip.',
102+
control: 'number',
103+
},
104+
hideDelay: {
105+
type: 'number',
106+
description:
107+
'Specifies the number of milliseconds that should pass before hiding the tooltip.',
108+
control: 'number',
109+
},
110+
message: {
111+
type: 'string',
112+
description: 'Specifies a plain text as tooltip content.',
113+
control: 'text',
114+
table: { defaultValue: { summary: '' } },
115+
},
93116
},
94117
args: {
95118
open: false,
96119
disableArrow: false,
97120
inline: false,
98121
offset: 4,
99122
placement: 'top',
123+
message: '',
100124
},
101125
};
102126

@@ -137,6 +161,12 @@ interface IgcTooltipArgs {
137161
* Expects a comma separate string of different event triggers.
138162
*/
139163
hideTriggers: string;
164+
/** Specifies the number of milliseconds that should pass before showing the tooltip. */
165+
showDelay: number;
166+
/** Specifies the number of milliseconds that should pass before hiding the tooltip. */
167+
hideDelay: number;
168+
/** Specifies a plain text as tooltip content. */
169+
message: string;
140170
}
141171
type Story = StoryObj<IgcTooltipArgs>;
142172

0 commit comments

Comments
 (0)