0.9.1-alpha.3
Alpha@xaui/native@0.9.1-alpha.3
Patch Changes
-
c4d26ad: Add
PressableFeedbackto@xaui/native/system: the touch feedback every pressable component shares, instead of an animation file per component.It renders the pressable root and is controlled — the component above owns
isPressed, because its recipe resolves on that value and needs it before rendering.feedbackVariantpicks what happens under the finger (scale-highlight,scale-ripple,scale,none) and mounts the matching overlay;PressableFeedback.Highlightand.Rippleare slots a root can render itself when it wants to style one.asChildgoes through this component rather than around it: a root swapping it for a bareSlotwould render the child with no touch feedback at all.isDisabledreplaces React Native'sdisabled(R8), and each overlay takes its ownanimation—false, or adurationandopacity— over the blanket one on the root.animationon the root acceptsfalse,'disabled','disable-all'or an object switching sub-animations off one at a time. Turning animations off renders a different component rather than the same one with a branch inside, so no Reanimated hook is reached and no worklet is mounted.'disable-all'reaches descendants through context, so a long list disables every row's worklets with one prop.Also types
XAUITheme['fontWeights']as React Native's ownfontWeightinstead ofstring, which does not assign to it — every component readingt.fontWeights.mediumwould otherwise have needed a cast.