@plurall/notifications
TypeScript icon, indicating that this package has built-in type declarations

2.0.22 • Public • Published

Plurall Notifications

Componente React para listar notificações do Plurall

Para rodar

yarn install
yarn start

Agora pode abrir localhost:6006 para testar o componente visualmente

Para Buildar

yarn build

Como Usar

  1. Inserir no root da aplicação o provider de notificação
  2. Inserir no root da aplicação o componente
import {
  Notifications,
  NotificationsProvider,
  useNotificationsPublicContext,
  NotificationIcon // caso a prop <Notifications icon={false} /> é possível utiliza o componente trigger <NotificationIcon />
} from '@plurall/notifications'

const {
  setOpen, // function que abre/fecha a central de notificação
  loading, // boolean que indica se o estado da central (requests) está em processo de loading
  badge, // boolean que indica se há novas notificações
  open, // boolean que indica se a central de notificações está aberta
} = useNotificationsPublicContext()

<NotificationsProvider
  // Config API Auth Firebase Token
  msApiURL={'Url da API de comunicações'}
  userToken={'Token do usuário logado'}
  // Config Firebase
  apiKey={'Chave do firebase'}
  authDomain={'Url de auth do firebase'}
  projectId={'Porject ID do firebase'}
  storageBucket={'Chave de config. do firebase'}
  messagingSenderId={'Chave de config. do firebase'}
  appId={'Chave de config. do firebase'}
  measurementId={'Chave de config. do firebase'}
>
  <Notifications />
</NotificationsProvider>

Readme

Keywords

none

Package Sidebar

Install

npm i @plurall/notifications

Weekly Downloads

0

Version

2.0.22

License

MIT

Unpacked Size

11.6 MB

Total Files

29

Last publish

Collaborators

  • rafael.teixeira.somos
  • williambraz
  • rcolonese.somos
  • plurall-dev
  • keppelen