From 2ef20ca431ec4c376ee11d6f73046447f3428d0e Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 17 Mar 2022 11:34:05 +0100 Subject: [PATCH] Rename extraAttributes to attributes. --- source/buttons/confirm-button.ts | 8 ++------ source/buttons/feedback-button.ts | 4 ++-- tests/buttons/confirm-button.test.ts | 6 +++--- tests/buttons/feedback-button.test.ts | 4 ++-- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/source/buttons/confirm-button.ts b/source/buttons/confirm-button.ts index fc416a0..bca9d20 100644 --- a/source/buttons/confirm-button.ts +++ b/source/buttons/confirm-button.ts @@ -5,11 +5,11 @@ import {Component, VNode} from 'preact'; * Component properties for {@linkcode ConfirmButton}. */ export type ConfirmButtonProps = { + attributes: Record; class: string; click: (event: MouseEvent) => unknown; confirmClass: string; confirmText: string; - extraAttributes: Record; preventDefault: boolean; text: string; timeout: number; @@ -76,11 +76,7 @@ export class ConfirmButton extends Component< } return html` - `; diff --git a/source/buttons/feedback-button.ts b/source/buttons/feedback-button.ts index e6f05ee..4e6bb26 100644 --- a/source/buttons/feedback-button.ts +++ b/source/buttons/feedback-button.ts @@ -5,8 +5,8 @@ import {Component, VNode} from 'preact'; * Component properties for {@linkcode FeedbackButton}. */ export type FeedbackButtonProps = { + attributes: Record; click: (event: MouseEvent) => unknown; - extraAttributes: Record; feedbackText: string; text: string; timeout: number; @@ -60,7 +60,7 @@ export class FeedbackButton extends Component< render(): VNode { return html` - `; diff --git a/tests/buttons/confirm-button.test.ts b/tests/buttons/confirm-button.test.ts index 56b487e..d2d1a2a 100644 --- a/tests/buttons/confirm-button.test.ts +++ b/tests/buttons/confirm-button.test.ts @@ -14,13 +14,13 @@ test('ConfirmButton', async (t) => { t.plan(3); const props: ConfirmButtonProps = { + attributes: { + id: 'confirm-button', + }, class: 'button', click: (event) => t.true(event !== undefined), confirmClass: 'confirm', confirmText: 'Confirm Button', - extraAttributes: { - id: 'confirm-button', - }, preventDefault: true, text: 'Button', timeout: 1000, diff --git a/tests/buttons/feedback-button.test.ts b/tests/buttons/feedback-button.test.ts index b520de8..9fabb4b 100644 --- a/tests/buttons/feedback-button.test.ts +++ b/tests/buttons/feedback-button.test.ts @@ -14,10 +14,10 @@ test('FeedbackButton', async (t) => { t.plan(5); const props: FeedbackButtonProps = { - click: (event) => t.true(event !== undefined), - extraAttributes: { + attributes: { id: 'feedback-button', }, + click: (event) => t.true(event !== undefined), feedbackText: 'Feedback Example', text: 'Example', timeout: 1000,