Skip to content

Commit d418f1b

Browse files
(Popover): update markups
1 parent 7b1ef61 commit d418f1b

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/scripts/Popover.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ export type PopoverProps = {
7070
bodyStyle?: CSSProperties;
7171
offsetX?: number;
7272
offsetY?: number;
73-
} & HTMLAttributes<HTMLDivElement>;
73+
} & HTMLAttributes<HTMLElement>;
7474

7575
/**
7676
*
7777
*/
7878
export const PopoverInner = forwardRef<
79-
HTMLDivElement,
79+
HTMLElement,
8080
PopoverProps & AutoAlignInjectedProps
8181
>((props, ref) => {
8282
const {
@@ -118,15 +118,15 @@ export const PopoverInner = forwardRef<
118118
: undefined,
119119
};
120120
return (
121-
<div
121+
<section
122122
ref={ref}
123123
className={popoverClassNames}
124124
role={tooltip ? 'tooltip' : 'dialog'}
125125
style={rootStyle}
126126
{...rprops}
127127
>
128128
<PopoverBody style={bodyStyle}>{children}</PopoverBody>
129-
</div>
129+
</section>
130130
);
131131
});
132132

stories/Popover.stories.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
ComponentStoryObj,
66
DecoratorFn,
77
} from '@storybook/react';
8+
import classNames from 'classnames';
89

910
/**
1011
*
@@ -20,7 +21,12 @@ const paddingDecorator: DecoratorFn = (story) => (
2021
padding: '100px 350px',
2122
}}
2223
>
23-
<div className='slds-dropdown-trigger'>
24+
<div
25+
className={classNames(
26+
'slds-dropdown-trigger',
27+
'slds-dropdown-trigger_click'
28+
)}
29+
>
2430
<Button type='icon' icon='question' />
2531
{story()}
2632
</div>

0 commit comments

Comments
 (0)