Skip to content

Commit

Permalink
feat(rich-tooltip): only show title when has title
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielduete committed Feb 13, 2025
1 parent ce387a2 commit 155808b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export namespace Components {
}
interface AtomRichTooltip {
"action": 'hover' | 'click';
"actionText": string;
"actionText"?: string;
"element": string;
"placement": | 'top'
| 'top-start'
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/components/rich-tooltip/rich-tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export class AtomRichTooltip {
| 'left' = 'top'
@Prop() action: 'hover' | 'click' = 'hover'
@Prop() title?: string
@Prop() actionText: string
@Prop() actionText?: string

@Event() buttonAction: EventEmitter<void>
@Event() buttonAction?: EventEmitter<void>

render() {
return (
Expand All @@ -42,7 +42,7 @@ export class AtomRichTooltip {
class='rich-tooltip'
>
<div class='rich-tooltip__content'>
<h1 class='title'>{this.title}</h1>
{this.title && <h1 class='title'>{this.title}</h1>}
<p class='text'>
<slot />
</p>
Expand Down

0 comments on commit 155808b

Please sign in to comment.