Skip to content

Commit

Permalink
Spread ChakraProvider props to Provider Component (#150)
Browse files Browse the repository at this point in the history
* Spread ChakraProvider props to Provider Component

* Implement changes suggested by Wth-Heart for cleaner Interface

* Add changeset

Co-authored-by: Dhaiwat Pandya <dhaiwatpandya@gmail.com>
  • Loading branch information
Ibby-devv and Dhaiwat10 authored Dec 24, 2021
1 parent 1e1d023 commit f0c96df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-bees-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@web3-ui/components': minor
---

Accept any ChakraProvider-compatible props in our Provider
8 changes: 4 additions & 4 deletions packages/components/src/components/Provider/Provider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { ChakraProvider } from '@chakra-ui/react';
import { ChakraProvider, ChakraProviderProps } from '@chakra-ui/react';

export interface ProviderProps {}
export interface ProviderProps extends ChakraProviderProps {}

export const Provider: React.FC<ProviderProps> = ({ children }) => {
return <ChakraProvider>{children}</ChakraProvider>;
export const Provider: React.FC<ProviderProps> = ({ children, ...props }) => {
return <ChakraProvider {...props}>{children}</ChakraProvider>;
};

0 comments on commit f0c96df

Please sign in to comment.