1- import { OneSignal } from 'react-native-onesignal' ;
21import * as React from 'react' ;
3- import { StyleSheet , View , Platform } from 'react-native' ;
4- import { renderButtonView } from './Helpers' ;
5- import { Text , Divider } from '@react-native-material/core' ;
2+ import { StyleSheet , Text , View } from 'react-native' ;
3+ import { OneSignal } from 'react-native-onesignal' ;
4+ import { renderButtonView } from './Helpers' ;
5+ // Remove: import {Text, Divider} from '@react-native-material/core';
66
77export interface Props {
88 loggingFunction : Function ;
@@ -11,7 +11,7 @@ export interface Props {
1111
1212class OSButtons extends React . Component < Props > {
1313 createInAppMessagesFields ( ) {
14- const { loggingFunction} = this . props ;
14+ const { loggingFunction } = this . props ;
1515
1616 const getPausedButton = renderButtonView ( 'Get paused' , async ( ) => {
1717 const paused = await OneSignal . InAppMessages . getPaused ( ) ;
@@ -94,7 +94,7 @@ class OSButtons extends React.Component<Props> {
9494 }
9595
9696 createLocationFields ( ) {
97- const { loggingFunction} = this . props ;
97+ const { loggingFunction } = this . props ;
9898 const locationShared = renderButtonView ( 'Is Location Shared' , async ( ) => {
9999 const isLocationShared = await OneSignal . Location . isShared ( ) ;
100100 loggingFunction (
@@ -129,7 +129,7 @@ class OSButtons extends React.Component<Props> {
129129 }
130130
131131 createNotificationFields ( ) {
132- const { loggingFunction} = this . props ;
132+ const { loggingFunction } = this . props ;
133133
134134 const hasPermissionButton = renderButtonView (
135135 'Has Notification Permission' ,
@@ -182,17 +182,17 @@ class OSButtons extends React.Component<Props> {
182182 }
183183
184184 createLiveActivitiesFields ( ) {
185- const { loggingFunction} = this . props ;
185+ const { loggingFunction } = this . props ;
186186
187187 const startDefaultLiveActivity = renderButtonView (
188188 'Start Default Live Activity' ,
189189 async ( ) => {
190190 loggingFunction ( 'Starting live activity' ) ;
191191 await OneSignal . LiveActivities . startDefault (
192192 this . props . inputFieldValue ,
193- { title : 'Welcome!' } ,
193+ { title : 'Welcome!' } ,
194194 {
195- message : { en : 'Hello World!' } ,
195+ message : { en : 'Hello World!' } ,
196196 intValue : 3 ,
197197 doubleValue : 3.14 ,
198198 boolValue : true ,
@@ -255,7 +255,7 @@ class OSButtons extends React.Component<Props> {
255255 }
256256
257257 createSessionFields ( ) {
258- const { loggingFunction} = this . props ;
258+ const { loggingFunction } = this . props ;
259259
260260 const sendOutcomeButton = renderButtonView ( 'Send Outcome With Name' , ( ) => {
261261 loggingFunction ( 'Sending outcome: ' , this . props . inputFieldValue ) ;
@@ -295,7 +295,7 @@ class OSButtons extends React.Component<Props> {
295295 }
296296
297297 createUserFields ( ) {
298- const { loggingFunction} = this . props ;
298+ const { loggingFunction } = this . props ;
299299
300300 const addEmailButton = renderButtonView ( 'Add Email' , ( ) => {
301301 loggingFunction ( 'Attempting to set email: ' , this . props . inputFieldValue ) ;
@@ -341,7 +341,7 @@ class OSButtons extends React.Component<Props> {
341341
342342 const addTagsButton = renderButtonView ( 'Add list of tags' , ( ) => {
343343 loggingFunction ( 'Adding list of tags' ) ;
344- OneSignal . User . addTags ( { my_tag1 : 'my_value' , my_tag2 : 'my_value2' } ) ;
344+ OneSignal . User . addTags ( { my_tag1 : 'my_value' , my_tag2 : 'my_value2' } ) ;
345345 } ) ;
346346
347347 const removeTagsButton = renderButtonView ( 'Remove list of tags' , ( ) => {
@@ -454,7 +454,7 @@ class OSButtons extends React.Component<Props> {
454454 }
455455
456456 pushSubscriptionFields ( ) {
457- const { loggingFunction} = this . props ;
457+ const { loggingFunction } = this . props ;
458458
459459 const getPushSubscriptionIdButton = renderButtonView (
460460 'Get Push Subscription Id' ,
@@ -497,7 +497,7 @@ class OSButtons extends React.Component<Props> {
497497 }
498498
499499 privacyConsentFields ( ) {
500- const { loggingFunction} = this . props ;
500+ const { loggingFunction } = this . props ;
501501
502502 const setPrivacyConsentGivenTrueButton = renderButtonView (
503503 'Set Privacy Consent to true' ,
@@ -542,43 +542,79 @@ class OSButtons extends React.Component<Props> {
542542 render ( ) {
543543 return (
544544 < View >
545- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
546- < Text variant = "h5" > InAppMessages</ Text >
547- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
545+ < View
546+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
547+ />
548+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } > InAppMessages</ Text >
549+ < View
550+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
551+ />
548552 { this . createInAppMessagesFields ( ) }
549553
550- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
551- < Text variant = "h5" > Location</ Text >
552- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
554+ < View
555+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
556+ />
557+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } > Location</ Text >
558+ < View
559+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
560+ />
553561 { this . createLocationFields ( ) }
554562
555- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
556- < Text variant = "h5" > Notifications</ Text >
557- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
563+ < View
564+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
565+ />
566+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } > Notifications</ Text >
567+ < View
568+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
569+ />
558570 { this . createNotificationFields ( ) }
559571
560- < Text variant = "h5" > Live Activities</ Text >
561- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
572+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } >
573+ Live Activities
574+ </ Text >
575+ < View
576+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
577+ />
562578 { this . createLiveActivitiesFields ( ) }
563579
564- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
565- < Text variant = "h5" > Session</ Text >
566- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
580+ < View
581+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
582+ />
583+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } > Session</ Text >
584+ < View
585+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
586+ />
567587 { this . createSessionFields ( ) }
568588
569- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
570- < Text variant = "h5" > User</ Text >
571- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
589+ < View
590+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
591+ />
592+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } > User</ Text >
593+ < View
594+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
595+ />
572596 { this . createUserFields ( ) }
573597
574- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
575- < Text variant = "h5" > Push Subscription</ Text >
576- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
598+ < View
599+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
600+ />
601+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } >
602+ Push Subscription
603+ </ Text >
604+ < View
605+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
606+ />
577607 { this . pushSubscriptionFields ( ) }
578608
579- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
580- < Text variant = "h5" > Privacy Consent</ Text >
581- < Divider style = { { marginTop : 10 , marginBottom : 10 } } />
609+ < View
610+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
611+ />
612+ < Text style = { { fontSize : 18 , fontWeight : 'bold' } } >
613+ Privacy Consent
614+ </ Text >
615+ < View
616+ style = { { height : 1 , backgroundColor : '#ccc' , marginVertical : 10 } }
617+ />
582618 { this . privacyConsentFields ( ) }
583619 </ View >
584620 ) ;
0 commit comments