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

feat: toolbar className customization #604

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

WebEferen
Copy link
Contributor

As my second PR, I would like to introduce the possibility to customize the toolbar className. It is helpful when you would like to style the toolbar (for example dark mode).

@WebEferen WebEferen changed the title feat: toolbar add className customization (for tailwind etc.) feat: toolbar className customization Oct 7, 2024
@@ -20,6 +20,7 @@ function App() {
markdown="Hello world"
plugins={[
toolbarPlugin({
toolbarClassName: 'my-classname',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just className, or , mayberootElementClassName?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petyosi to keep naming consistent across the toolbar component. There is toolbarContent, so toolbarClassName points user directly to the Root element (so the wrapper around the content itself).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toolbarClassName gives user pretty good understanding where this class will be applied (also good for the future, when there might be more classess for different elements).

@petyosi petyosi merged commit dc2bfb3 into mdx-editor:main Oct 7, 2024
@WebEferen WebEferen deleted the feat-toolbar-add-customization branch October 7, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants