Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Latest commit

 

History

History
28 lines (24 loc) · 765 Bytes

open-url.md

File metadata and controls

28 lines (24 loc) · 765 Bytes

openUrl

Check the specification for the full definition of this action.

Properties

interface OpenUrlParams {
  /**
   * The URL to open.
   */
  url: Expression<string>,
}

Example

import { NimbusJSX } from '@zup-it/nimbus-backend-core'
import { openUrl } from '@zup-it/nimbus-backend-core/actions'
import { Screen } from '@zup-it/nimbus-backend-express'
import { Button } from '../components/button' // this component's implementation is not important for this example

const MyScreen: Screen = () => (
  <Button onPress={openUrl('https://www.google.com.br')}>
    Go to Google
  </Button>
)

The button in the screen above, when pressed, opens Google in the default web browser.