Created
April 19, 2021 02:51
-
-
Save willmendesneto/e2b49cdb6a6dccb90d800a20887c2185 to your computer and use it in GitHub Desktop.
TinyMCE Wrapper Theme using Material-UI and React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This file will live in `editor/themes/minimal.js` | |
| import React from "react"; | |
| import { Grid, withStyles } from "@material-ui/core"; | |
| export const Minimal = withStyles(theme => ({ | |
| root: { | |
| "& .tox .tox-tbtn svg": { | |
| fill: theme.palette.grey["500"] | |
| }, | |
| "& .tox .tox-tbtn:hover svg": { | |
| fill: theme.palette.common.white | |
| }, | |
| "& .tox .tox-tbtn": { | |
| transition: "background-color 0.3s ease" | |
| }, | |
| "& .tox .tox-tbtn:hover, & .tox .tox-tbtn:active, & .tox .tox-tbtn:focus": { | |
| backgroundColor: theme.palette.grey["500"], | |
| cursor: "pointer" | |
| }, | |
| "& .tox-tinymce": { | |
| borderRadius: theme.shape.borderRadius | |
| }, | |
| "& .tox .tox-toolbar__primary": { | |
| backgroundColor: theme.palette.grey["100"], | |
| backgroundImage: "none", | |
| padding: theme.spacing(2) | |
| }, | |
| "& .tox .tox-edit-area__iframe": { | |
| borderTop: `1px solid ${theme.palette.grey["400"]}` | |
| }, | |
| "& .tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type)": { | |
| border: "transparent" | |
| }, | |
| "& .tox-toolbar-overlord .tox-toolbar__primary .tox-toolbar__group:last-child": { | |
| marginLeft: "auto" | |
| } | |
| } | |
| }))(Grid); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment