Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edgeworkscreative/st-press
:arrow_double_down: Adds the `onPress` event to your Stencil app.
https://github.com/edgeworkscreative/st-press
event ionic4 jsx stencil stenciljs
Last synced: about 1 month ago
JSON representation
:arrow_double_down: Adds the `onPress` event to your Stencil app.
- Host: GitHub
- URL: https://github.com/edgeworkscreative/st-press
- Owner: edgeworkscreative
- License: mit
- Created: 2018-08-23T21:09:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T19:55:11.000Z (over 6 years ago)
- Last Synced: 2024-12-02T00:43:35.594Z (about 1 month ago)
- Topics: event, ionic4, jsx, stencil, stenciljs
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@edgeworkscreative/st-press
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# st-press
Adds the `onPress` event to your Stencil app. Press is recognized when the pointer is down for 251ms without any movement.Add the following to your `global-script.tsx` file:
```ts
import '@edgeworkscreative/st-press';
````example-component.tsx`:
```ts
@Component({
tag: 'example-component',
styleUrl: 'example-component.scss',
shadow: true
})
export class ExampleComponent {onPress(e) {
console.log('item was pressed', e);
}
render() {
return [
this.onPress(e)}>One
this.onPress(e)}>Two
this.onPress(e)}>Three
];
}
}
```