Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

];
}
}
```