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

How can I change style of Toast? #50

Closed
oscarcornejo opened this issue Sep 21, 2020 · 6 comments · Fixed by #105
Closed

How can I change style of Toast? #50

oscarcornejo opened this issue Sep 21, 2020 · 6 comments · Fixed by #105
Labels
enhancement New feature or request

Comments

@oscarcornejo
Copy link

No description provided.

@Dallas62
Copy link

Hi @calintamas
I'm running into the same issue.
If I want to change some values of the style (text-size), I don't have other choices than recreate the whole component which provide a bad developer-experience.
The initial design is great but allow some adjustment would be cool !

@calintamas
Copy link
Owner

@Dallas62 Hi, thanks for the feedback!
I'll think of a way to support that, while keeping the current method of customizing types. Maybe exporting each default component and allowing style props for them.

@thanveershah
Copy link

@Dallas62 Hi, thanks for the feedback! I'll think of a way to support that, while keeping the current method of customizing types. Maybe exporting each default component and allowing style props for them.

Is changing the background possible now?

@rie-kumar
Copy link

I would like to know if this is possible now too! Also, love this package.

@melnikovkolya
Copy link

Hi folks,

You can do it as follows:

<Toast
  config={{
    success: (props) => (
      <SuccessToast
        {...props}
        contentContainerStyle={toastContentContainerStyle}
        text1Style={toastText1Style}
      />
    ),
    error: (props) => (
      <ErrorToast
        {...props}
        contentContainerStyle={toastContentContainerStyle}
        text1Style={toastText1Style}
      />
    ),
    info: (props) => (
      <InfoToast
        {...props}
        contentContainerStyle={toastContentContainerStyle}
        text1Style={toastText1Style}
      />
    ),
  }}
/>

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

Successfully merging a pull request may close this issue.

6 participants