@pure-ds/storybook 0.4.23 → 0.4.25

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.
@@ -434,7 +434,7 @@ Global form options that can be set via the `options` property:
434
434
  ```javascript
435
435
  const options = {
436
436
  widgets: {
437
- booleans: "toggle", // "toggle" or "checkbox"
437
+ booleans: "toggle", // "toggle" | "toggle-with-icons" | "checkbox"
438
438
  numbers: "input", // "input" or "range"
439
439
  selects: "standard" // "standard" or "dropdown"
440
440
  },
@@ -123,17 +123,8 @@ export async function toastFormData(data) {
123
123
  const truncated = truncateData(obj);
124
124
  const formatted = JSON.stringify(truncated, null, 2);
125
125
 
126
- // Ensure pds-toaster exists and show the toast
127
- let toaster = document.querySelector('pds-toaster');
128
- if (!toaster) {
129
- toaster = document.createElement('pds-toaster');
130
- document.body.appendChild(toaster);
131
- }
132
-
133
- // Wait for the custom element to be defined before calling methods
134
- await customElements.whenDefined('pds-toaster');
135
-
136
- toaster.toast(formatted, {
126
+ // Use PDS.toast() to display the formatted data
127
+ await PDS.toast(formatted, {
137
128
  type: 'success',
138
129
  duration: 5000
139
130
  });