@fluid-topics/ft-confirm-button 1.1.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ A two step confirmation button
2
+
3
+ ## Install
4
+
5
+ ```shell
6
+ npm install @fluid-topics/ft-confirm-button
7
+ yarn add @fluid-topics/ft-confirm-button
8
+ ```
9
+
10
+ ## Usage
11
+
12
+ ```typescript
13
+ import {html} from "lit"
14
+ import "@fluid-topics/ft-confirm-button"
15
+
16
+ function render() {
17
+ return html` <ftds-confirm-button
18
+ primary
19
+ buttonText: "Do action",
20
+ text: "The message in the confirmation dialog",
21
+ confirmText: "Confirm",
22
+ cancelText: "Cancel action"
23
+ ></ftds-confirm-button> `
24
+ }
25
+ ```
@@ -0,0 +1,6 @@
1
+ import { FtdsConfirmButton } from "./index";
2
+ export declare class ConfirmButtonTestHelper {
3
+ confirmButton: FtdsConfirmButton;
4
+ constructor(confirmButton: FtdsConfirmButton);
5
+ clickAndConfirm(): void;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { ConfirmEvent } from "./index";
2
+ export class ConfirmButtonTestHelper {
3
+ constructor(confirmButton) {
4
+ this.confirmButton = confirmButton;
5
+ }
6
+ clickAndConfirm() {
7
+ this.confirmButton.dispatchEvent(new ConfirmEvent());
8
+ }
9
+ }