Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/nandorojo/moti
Browse files Browse the repository at this point in the history
  • Loading branch information
nandorojo committed Feb 18, 2024
2 parents 277382d + de89463 commit 08e3459
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
10 changes: 0 additions & 10 deletions docs/docs/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,8 @@ Moti works on all platforms, including Web. Make sure you've installed `react-na

## Expo Web support

The following applies to React Native Web apps that **do not** use Next.js.

Expo Web should work out of the box.

Install `@expo/webpack-config` to your `devDependencies`:

```bash npm2yarn
npm install -D @expo/webpack-config
```

Then run `yarn web` and you're done!

## Expo Router / Metro Web

You'll need to add `mjs` to your `sourceExts` in `metro.config.js`. For example:
Expand Down
2 changes: 2 additions & 0 deletions packages/moti/src/interactions/pressable/pressable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const MotiPressable = forwardRef<View, MotiPressableProps>(
onFocus,
onBlur,
href,
testID,
} = props

const _hovered = useSharedValue(false)
Expand Down Expand Up @@ -156,6 +157,7 @@ export const MotiPressable = forwardRef<View, MotiPressableProps>(
onPressIn={updateInteraction('pressed', true, onPressIn)}
onPressOut={updateInteraction('pressed', false, onPressOut)}
ref={ref}
testID={testID}
onLayout={onContainerLayout}
// Accessibility props
accessibilityActions={accessibilityActions}
Expand Down
1 change: 1 addition & 0 deletions packages/moti/src/interactions/pressable/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export type MotiPressableProps = {
*/
onContainerLayout?: PressableProps['onLayout']
href?: string
testID?: PressableProps['testID']
children?:
| React.ReactNode
| ((
Expand Down

0 comments on commit 08e3459

Please sign in to comment.