@edgeworkscreative/st-press
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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:

import '@edgeworkscreative/st-press';

example-component.tsx:

@Component({
  tag:      'example-component',
  styleUrl: 'example-component.scss',
  shadow:   true
})
export class ExampleComponent {

  onPress(e) {
    console.log('item was pressed', e);
  }
  
  render() {
    return [
      <ion-list lines={'full'}>
        <ion-item onPress={(e) => this.onPress(e)}>One</ion-item>
        <ion-item onPress={(e) => this.onPress(e)}>Two</ion-item>
        <ion-item onPress={(e) => this.onPress(e)}>Three</ion-item>
      </ion-list>
    ];
  }
}

/@edgeworkscreative/st-press/

    Package Sidebar

    Install

    npm i @edgeworkscreative/st-press

    Weekly Downloads

    1

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    49.1 kB

    Total Files

    16

    Last publish

    Collaborators

    • adamlacombe
    • drnwrks