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

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

Open
3 tasks done
jovana opened this issue Nov 9, 2023 · 1 comment
Open
3 tasks done

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

jovana opened this issue Nov 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jovana
Copy link

jovana commented Nov 9, 2023

Checklist

  • I've looked through the README
  • I've verified that I'm running react-big-schedule version 4.2.0
  • 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 jovana added the enhancement New feature or request label Nov 9, 2023
@ansulagrawal
Copy link
Member

Yes great idea we will try to implement it

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

No branches or pull requests

2 participants