Interface ISliderDrawer<TEvent>

Type Parameters

Hierarchy

Methods

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "load" | "hide" | "show" | TEvent
    • callback: EventListenerCallback

      Gets as any arguments as it needs

    Returns (() => void)

      • (): void
      • Creates an event emitter instance to listen for the actions

        Returns

        Call the function to remove the event

        Returns void

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "load" | "hide" | "show" | TEvent
    • callback: EventListenerCallback

      Gets as any arguments as it needs

    Returns (() => void)

      • (): void
      • Creates an event emitter instance to listen for the actions

        Returns

        Call the function to remove the event

        Returns void

  • Removes the specified event and invokes the callback after it is removed

    Parameters

    Returns void

  • Triggers the event manually.

    Parameters

    • event: "load" | "hide" | "show" | TEvent
    • Rest ...args: any[]

      Arguments that needs to be passed down

    Returns void

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Parameters

    Returns void

  • Adds a one-time listener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    Parameters

    Returns void

  • This function allows you to show SliderDrawer on the screen.

    Method

    show

    Android

    Ios

    Since

    0.1

    Returns void

  • This function allows you to hide SliderDrawer if it is on the screen.

    Method

    hide

    Android

    Ios

    Since

    0.1

    Returns void

Properties

nativeObject: any
ios: Partial<{ [key: string]: any }>
android: Partial<{ [key: string]: any }>
drawerPosition: SliderDrawerPosition

Gets/sets position of the SliderDrawer.

Property

= UI.SliderDrawer.Position.LEFT]

Android

Ios

Since

0.1

Gets state of the SliderDrawer.

Property

Android

Ios

Since

1.1.8

layout: IFlexLayout<"touch" | "touchCancelled" | "touchEnded" | "touchMoved" | "viewAdded" | "viewRemoved" | "interceptTouchEvent", MobileOSProps<FlexLayoutIOSProps, FlexLayoutAndroidProps>>

Gets/sets layout of the SliderDrawer.

Property

= UI.FlexLayout]

Android

Ios

Since

0.1

enabled: boolean

Enables/disables the SliderDrawer.

Property

= true]

Android

Ios

Since

0.1

height: number

Gets/Sets the height of SliderDrawer

width: number

Gets/Sets the width of SliderDrawer

backgroundColor: IColor

Gets/Sets the background color of SliderDrawer

Events

onShow: (() => null | void)

Type declaration

    • (): null | void
    • This event is called user opens the SliderDrawer.

      onShow

      Deprecated

      Android

      Ios

      Since

      0.1

      Example

      import SliderDrawer from '@smartface/native/ui/sliderdrawer';

      const sliderDrawer = new SliderDrawer();
      sliderDrawer.on(SliderDrawer.Events.Show, () => {
      console.info('onShow');
      });

      Returns null | void

onHide: (() => null | void)

Type declaration

    • (): null | void
    • This event is called when user closes the SliderDrawer.

      onHide

      Deprecated

      Android

      Ios

      Since

      0.1

      Example

      import SliderDrawer from '@smartface/native/ui/sliderdrawer';

      const sliderDrawer = new SliderDrawer();
      sliderDrawer.on(SliderDrawer.Events.Hide, () => {
      console.info('onHide');
      });

      Returns null | void

onLoad: (() => null | void)

Type declaration

    • (): null | void
    • This event is called when SliderDrawer begins to load.

      onLoad

      Deprecated

      Android

      Ios

      Since

      0.1

      Example

      import SliderDrawer from '@smartface/native/ui/sliderdrawer';

      const sliderDrawer = new SliderDrawer();
      sliderDrawer.on(SliderDrawer.Events.Load, () => {
      console.info('onLoad');
      });

      Returns null | void

Generated using TypeDoc