Mantine support

Recently I started a new project with Mantine a lovely UI-Library that I definitely prefer over MUI so far.
As you can see in their getting-started they do have buttons for getting started with Next, Gatsby and Remix among others.

Wouldn’t it be nice to have a template for redwood too? :slight_smile:
That might improve visibility and so on ~

I am not sure what exactly this would entail therefore let’s discuss it here!

Wow, that does look nicer than MUI !! Thanks for the pointer !

Hey Avataw

I missed this post earlier… there is support coming for rw setup ui mantine:

2 Likes

How to make mantine work in the test? All my test is broken after adding mantine ui.

Error message: "@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app"

From the mantine documenation, it seems that the render function needs to include the provider which requires creating a custom render function that should extend the main render.

Since the RW has its own render function, is there a way to tap in to the RW render function?

1 Like

In the App file verify that you have MantineProvider, if the tests still fail, wrap your components, for example:

it('Your test', () => {
  render(
    <MantineProvider>
      <YourComponent />
    </MantineProvider>
  );
  
  // Your test assertions go here
});

I hope this helped you.

Thanks for the reply.

Yes, I have the MantineProvider in the App that wraps properly.

I could wrap every component test like you suggested, but, is there a way that we can extend the RW render method and can use the customized render method for the ongoing tests?

maybe you are looking for this

beforeEach(() => {
    
  })