🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@vygruppen/spor-alert-react-native

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vygruppen/spor-alert-react-native

latest
Source
npmnpm
Version
1.0.13
Version published
Maintainers
1
Created
Source

Alert (React Native)

Installation

$ npm install @vygruppen/spor-alert-react-native

Usage

Alerts comes in three different variants: <SimpleAlert>, <ClosableAlert> and <ExpandableAlert>

SimpleAlert: a simple alert with no heading, and mandatory props: children, colorScheme and leftIcon.
ClosableAlert: an alert with a closeButton. Mandatory props: children, colorScheme, leftIcon, heading, onClose.
ExpandableAlert: an alert with expandable content and optional onToogle. Mandatory props: children, colorScheme, leftIcon, heading, (optional props: defaultExpanded, onToogle)

colorScheme is either yellow, light-yellow, orange, red, green or blue,

import {SimpleAlert, ClosableAlert, ExpandableAlert} from "@vygruppen/spor-alert-react-native";




example:

<SimpleAlert colorScheme="green" leftIcon={<SuccessOutline18Icon />}>
  Informasjon om alternativ transport for avganger som ikke gĂĄr som normalt.
</SimpleAlert>


<ClosableAlert
  colorScheme="red"
  heading="Feilmelding"
  leftIcon={<DeleteCircleOutline18Icon />}
  onClose={() => {
    console.log("Test av lukke-knapp");
  }}
>
  <Text>Informasjon om brukerfeil og når noe har gått galt i kjøpsløpet.</Text>
</ClosableAlert>


<ExpandableAlert
  colorScheme="blue"
  leftIcon={<InformationOutline18Icon />}
  heading="Informasjon">
  <Text>
    Generell positiv informasjon, som pĂĄvirker den reisende i liten og
    mellomstor betydning. {"\n"}
  </Text>
</ExpandableAlert>;

Development

Please refer to the root readme for development notes.

FAQs

Package last updated on 30 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts