Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Configuration Error #288

Open
ianTakumi opened this issue Dec 15, 2024 · 2 comments
Open

[BUG] Configuration Error #288

ianTakumi opened this issue Dec 15, 2024 · 2 comments

Comments

@ianTakumi
Copy link

Prerequisites
Please answer the following questions for yourself before submitting an issue.

  • [✓] I am running the latest version
  • [✓] I checked the documentation and found no answer
  • [✓] I checked to make sure that this issue has not already been filed

Describe the bug
I am trying to use RNNotificated to my personal proj, specifically i am trying to use it on a dark mode but somehow it's not changing to dark mode

import { createNotifications } from "react-native-notificated";

const { useNotifications } = createNotifications({
  defaultStylesSettings: {
    darkMode: false,
    globalConfig: {
      borderRadius: 5000,
    },
  },
});

const { notify } = useNotifications();

type NotificationStatus = "success" | "error" | "info" | "warning";

export const notifyToast = (
  title: string,
  description: string,
  status: NotificationStatus
) => {
  notify(status, {
    params: {
      title: title,
      description: description,
    },
  });
};
@PdoubleU
Copy link
Collaborator

Hi @ianTakumi , first of all thanks for choosing our package for your app :)

In the code example you provided I can see there is darkMode: false, thus dark mode is switched off.

Here is the entire section for dark mode in the RNNotificated:
https://docs.thewidlarzgroup.com/react-native-notificated/docs/intro/examples/dark-mode-examples

Please let us know if problem still occurs.

@ianTakumi
Copy link
Author

Hi @PdoubleU , i updated my code based on the docs but it seems that it still on light mode?

import { createNotifications } from "react-native-notificated";

const { useNotifications } = createNotifications({
  isNotch: true,
  defaultStylesSettings: {
    darkMode: true,
    globalConfig: {
      borderRadius: 5000,
    },
  },
});

const { notify } = useNotifications();

type NotificationStatus = "success" | "error" | "info" | "warning";

export const notifyToast = (
  title: string,
  description: string,
  status: NotificationStatus
) => {
  notify(status, {
    params: {
      title: title,
      description: description,
    },
  });
};

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants