Skip to content

Commit

Permalink
Closed #128
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Apr 16, 2024
1 parent e0e80b7 commit c1f4a2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/duoyun-ui/src/elements/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ export class DuoyunPopoverElement extends GemElement<PopoverState> {
return callback;
}

ghostStyle: GhostStyle = {
static ghostStyle: GhostStyle = {
'--bg': theme.backgroundColor,
'--color': theme.highlightColor,
};

ghostStyle?: GhostStyle;

get #position() {
return this.position || 'auto';
}
Expand Down Expand Up @@ -334,6 +336,7 @@ export class DuoyunPopoverElement extends GemElement<PopoverState> {
data-position=${position}
style=${styleMap({
...style,
...(this.constructor as unknown as DuoyunPopoverElement).ghostStyle,
...this.ghostStyle,
pointerEvents: this.unreachable ? 'none' : undefined,
})}
Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/src/elements/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DuoyunPopoverElement } from './popover';
*/
@customElement('dy-tooltip')
export class DuoyunTooltipElement extends DuoyunPopoverElement {
ghostStyle = {
static ghostStyle = {
'--bg': theme.highlightColor,
'--color': theme.backgroundColor,
'max-width': '15em',
Expand Down

0 comments on commit c1f4a2b

Please sign in to comment.