Skip to content

Commit bcadb0a

Browse files
committed
feat(rich-tooltip): rename actiontext prop
1 parent a3580fa commit bcadb0a

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

packages/core/src/components.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export namespace Components {
227227
}
228228
interface AtomRichTooltip {
229229
"action": 'hover' | 'click';
230-
"actiontext": string;
230+
"actionText": string;
231231
"element": string;
232232
"placement": | 'top'
233233
| 'top-start'
@@ -645,7 +645,7 @@ declare global {
645645
new (): HTMLAtomPaginationElement;
646646
};
647647
interface HTMLAtomRichTooltipElementEventMap {
648-
"buttonaction": void;
648+
"buttonAction": void;
649649
}
650650
interface HTMLAtomRichTooltipElement extends Components.AtomRichTooltip, HTMLStencilElement {
651651
addEventListener<K extends keyof HTMLAtomRichTooltipElementEventMap>(type: K, listener: (this: HTMLAtomRichTooltipElement, ev: AtomRichTooltipCustomEvent<HTMLAtomRichTooltipElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -1020,9 +1020,9 @@ declare namespace LocalJSX {
10201020
}
10211021
interface AtomRichTooltip {
10221022
"action"?: 'hover' | 'click';
1023-
"actiontext"?: string;
1023+
"actionText"?: string;
10241024
"element"?: string;
1025-
"onButtonaction"?: (event: AtomRichTooltipCustomEvent<void>) => void;
1025+
"onButtonAction"?: (event: AtomRichTooltipCustomEvent<void>) => void;
10261026
"placement"?: | 'top'
10271027
| 'top-start'
10281028
| 'top-end'

packages/core/src/components/rich-tooltip/rich-tooltip.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export class AtomRichTooltip {
2828
| 'left' = 'top'
2929
@Prop() action: 'hover' | 'click' = 'hover'
3030
@Prop() title?: string
31-
@Prop() actiontext: string
31+
@Prop() actionText: string
3232

33-
@Event() buttonaction: EventEmitter<void>
33+
@Event() buttonAction: EventEmitter<void>
3434

3535
render() {
3636
return (
@@ -46,9 +46,9 @@ export class AtomRichTooltip {
4646
<p class='text'>
4747
<slot />
4848
</p>
49-
{this.action === 'click' && this.actiontext && (
50-
<p class='action' onClick={() => this.buttonaction.emit()}>
51-
{this.actiontext}
49+
{this.action === 'click' && this.actionText && (
50+
<p class='action' onClick={() => this.buttonAction.emit()}>
51+
{this.actionText}
5252
</p>
5353
)}
5454
</div>

packages/core/src/components/rich-tooltip/stories/rich-tooltip.args.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ export const RichTooltipStoryArgs = {
7676
category: Category.PROPERTIES,
7777
},
7878
},
79-
actiontext: {
79+
actionText: {
8080
control: 'text',
8181
description: 'Determines a text for action button.',
8282
table: {
8383
category: Category.PROPERTIES,
8484
},
8585
},
86-
buttonaction: {
86+
buttonAction: {
8787
description:
8888
'Event emitted when the action button is clicked. Action needs to be click to show the button.',
8989
table: {
@@ -112,6 +112,6 @@ export const RichTooltipComponentArgs = {
112112
text: 'Supporting line text lorem ipsum dolor sit amet, consectetur',
113113
action: 'hover',
114114
title: 'Title',
115-
actiontext: 'Action Button',
115+
actionText: 'Action Button',
116116
open: false,
117117
}

packages/core/src/components/rich-tooltip/stories/rich-tooltip.core.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const createRichTooltip = (args, buttonText = 'hover') => {
2828
element="${args.element}"
2929
title="${args.title}"
3030
action="${args.action}"
31-
actiontext="${args.actiontext}"
32-
buttonaction="${args.buttonaction}"
31+
action-text="${args.actionText}"
32+
button-action="${args.buttonAction}"
3333
open="${args.open}"
3434
>
3535
${args.text}

packages/core/src/components/rich-tooltip/stories/rich-tooltip.react.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ const createTooltip = (args, buttonText = 'Hover') => (
2929
element={args.element}
3030
title={args.title}
3131
action={args.action}
32-
actiontext={args.actiontext}
33-
buttonaction={args.buttonaction}
32+
actionText={args.actiontext}
3433
open={args.open}
3534
>
3635
{args.text}

packages/core/src/components/rich-tooltip/stories/rich-tooltip.vue.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ const createTooltip = (args, buttonText = 'Hover') => ({
3333
:element="args.element"
3434
:title="args.title"
3535
:action="args.action"
36-
:actiontext="args.actiontext"
37-
:buttonaction="args.buttonaction"
36+
:actionText="args.actiontext"
3837
:open="args.open"
3938
>
4039
{{ args.text }}

0 commit comments

Comments
 (0)