react-big-schedule icon indicating copy to clipboard operation
react-big-schedule copied to clipboard

Is it possible to have the antd ConfigProvider consumd / wrap?

Open jovana opened this issue 2 years ago • 1 comments

Checklist

  • [X] I've looked through the README
  • [X] I've verified that I'm running react-big-schedule version 4.2.0
  • [X] I've searched existing feature requests and confirmed that this request is not a duplicate

What problem does this feature solve?

I would like to use the Customize Design Token like described here: https://ant.design/docs/react/customize-theme.

Because this integration is using Ant Design already, it is probably easy to add?

Proposed Solution

This is a very basic example of how to use the theme / custom settings:

import { Scheduler,  } from 'react-big-schedule';
import { ConfigProvider, theme,  } from 'antd';

const App = () =>{
  const { useToken } = theme;
  const { token } = useToken();

  return(
   <ConfigProvider
                            theme={{
                                token: {
                                    colorPrimary: token.colorPrimary,
                                    colorPrimaryHover: token.colorPrimaryHover,
                                    borderRadius: token.borderRadius,
                                },
                            }}>
                            <Scheduler {...props}  />
                        </ConfigProvider>
)}

Benefits

The Scheduler got the same colors and gui setup as the rest of the antd application config.

Alternatives Considered

No response

Additional Information

No response

jovana avatar Nov 09 '23 07:11 jovana

Yes great idea we will try to implement it

ansulagrawal avatar Nov 13 '23 12:11 ansulagrawal