File tree 3 files changed +31
-2
lines changed
packages/ui-extensions/src/surfaces/checkout
3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @shopify/ui-extensions-react ' : patch
3
+ ' @shopify/ui-extensions ' : patch
4
+ ---
5
+
6
+ ScrollView scrollTo docs changes
Original file line number Diff line number Diff line change @@ -56,7 +56,23 @@ export interface ScrollViewProps
56
56
*/
57
57
direction ?: 'block' | 'inline' ;
58
58
/**
59
- * Scroll to a specific position or to an element.
59
+ * Scroll to a specific position or to an element when the component is first rendered.
60
+ *
61
+ * This property allows you to set an initial scroll position or scroll to a specific element
62
+ * when the `ScrollView` component mounts. Note that this action will only be performed once,
63
+ * during the initial render of the component.
64
+ *
65
+ * @example
66
+ * // Scroll to 100 pixels from the top on initial render
67
+ * <ScrollView scrollTo={100} />
68
+ *
69
+ * // Scroll to a specific element on initial render
70
+ * const elementRef = useRef(null);
71
+ * <ScrollView scrollTo={elementRef.current} />
72
+ *
73
+ * @note
74
+ * This property will only take effect on the first render. Subsequent updates to this property
75
+ * will not trigger additional scroll actions.
60
76
*/
61
77
scrollTo ?: number | HTMLElement ;
62
78
/**
Original file line number Diff line number Diff line change @@ -109,14 +109,21 @@ export interface ConditionalStyle<
109
109
110
110
/**
111
111
* A type that represents a value that can be a conditional style.
112
- * We highly recommend using the Style helper which simplifies the creation of conditional styles.
112
+ * We highly recommend using the `Style` helper which simplifies the creation of conditional styles.
113
+ *
113
114
* To learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation.
114
115
*/
115
116
export type MaybeConditionalStyle <
116
117
T ,
117
118
AcceptedConditions extends BaseConditions = Conditions ,
118
119
> = T | ConditionalStyle < T , AcceptedConditions > ;
119
120
121
+ /**
122
+ * A type that represents a value that can be a conditional style. The conditions are based on the viewport size.
123
+ * We highly recommend using the `Style` helper which simplifies the creation of conditional styles.
124
+ *
125
+ * To learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation.
126
+ */
120
127
export type MaybeResponsiveConditionalStyle < T > =
121
128
| T
122
129
| ConditionalStyle < T , ViewportSizeCondition > ;
You can’t perform that action at this time.
0 commit comments