publish-notification-widget
v0.2.2
Published
Downloads
24
Readme
publish-notification-widget
Widget destinado aos usuários do Push Platform. Este widget é um formulário para fazer a publicação de notificações.
Instalação
NPM
npm install --save publish-notification-widget
YARN
yarn add publish-notification-widget
Utilização
import React from 'react'
import PublishNotificationWidget from 'publish-notification-widget'
export default function Example(){
return <PublishNotificationWidget subdomain="vilaapps" />
}
Props
| PROP | OBRIGATÓRIO | DESCRIÇÃO | |------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | subdomain | sim | Essa prop irá compor a URL da requisição para o backend do Push Platform, caso utilize funções personalizadas para todas as requisições, esta prop deixa de ser obrigatória. | | dev | não | Booleano para definir se está utilizando a base de desenvolvimento ou produção. Padrão: false | | getEndpointsProp | não | Função de busca dos endpoints (dispositivo dos usuários que recebem a push notification) | | getSnsApplicationsProp | não | Função para busca dos aplicativos cadastrados | | getTopicsProp | não | Função para busca dos tópicos | | sendNotificationProp | não | Função para envio da notificação |
OBS: Todas as funções devem retornar um array com os itens em questão, ou seja, as "entries" da resposta da API do Push Platform.
License
MIT © vilaapps