You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `label` prop on the checkout and customer-account `s-checkbox` component now accepts a label as a slot in addition to a plain string, label slots can include only plain text and s-links.
* A unique identifier for this element within its parent. This is used by the rendering engine for efficient reconciliation when lists change.
19
+
*/
15
20
key?: preact.Key;
21
+
/**
22
+
* A reference to the underlying DOM element, typically created using `useRef()`. This allows you to access and manipulate the DOM element directly in your component logic.
23
+
*/
16
24
ref?: preact.Ref<TClass>;
25
+
/**
26
+
* Assigns the element to a named slot in a parent component that uses slot-based composition patterns.
27
+
*/
17
28
slot?: Lowercase<string>;
18
29
}
19
30
/**
@@ -33,8 +44,14 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
* The visual content to use as the control label. Use a string to provide a simple text label displayed to the user.
51
+
*
52
+
* If a `label` slot is also provided, the slot content takes precedence. [Learn more about slots](/docs/api/{API_NAME}/{API_VERSION}/web-components/forms/checkbox#slots-propertydetail-label).
* Use an `HTMLElement` as a rich control label composed of elements. Only an `s-text` element is supported with plain text and `s-link` as its only allowed children. Any other elements are stripped while preserving their text content.
0 commit comments