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
feat(web): pressable links in the input component (#795)
# Summary
Closes #790
- implemented `onLinkPress` prop for the `EnrichedTextInput` component
on Web. If not provided, the behavior doesn't change.
- as now both components use `a.pressColor` in `htmlStyle`, code
regarding the previously `EnrichedText`-only `a.pressColor` has been
refactored.
- also I've noticed that in `EnrichedText` when `onLinkPress` was not
provided, you could still 'click' the link - `pressColor` was applied
and cursor was changed to `pointer`. Fixed.
All e2e and jest web tests pass.
## Test Plan
The onPressLink event is wired up in the example app, you can see its
effect in the console logs.
Play around with it, see if the the link's colors are correctly changing
when pressing. Then you can remove the `onLinkPress` prop from both the
`EnrichedTextInput` and `EnrichedText` component and see that the links
will not react on clicks anymore.
## Screenshots / Videos
With `onLinkPress` defined:
https://github.com/user-attachments/assets/0a3a9e32-701b-474f-86dc-2b855e662850
With `onLinkPress` not defined:
https://github.com/user-attachments/assets/834efa57-060d-4f16-b918-454982fc8d85
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| iOS | ❌ |
| Android | ❌ |
| Web | ✅ |
## Checklist
- [x] E2E tests are passing
- [x] Required E2E tests have been added (if applicable)
0 commit comments