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

Use theme provided by theme.js file and not css. #197

Open
njakuschona opened this issue Dec 23, 2020 · 3 comments
Open

Use theme provided by theme.js file and not css. #197

njakuschona opened this issue Dec 23, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@njakuschona
Copy link
Contributor

In the [theme.js] every used color should be written. (Primary, Seccondary, warning, success, error, ...)
These colors should be used throughout the UI and imported from the Theme instead of setting them in the css files.
For example in the check.css

success {
    color: #008643;
}

The theme of the color should be used instead.

How To:

  1. import the Theme to the check.js file
    import { useTheme } from '@material-ui/core/styles';
  2. use the Theme
function Status(status) {
    const theme = useTheme();
    switch (status.status) {
        case 'success':
            return <span style={{"color": theme.palette.success.main}}>Success</span>
@njakuschona
Copy link
Contributor Author

belongs to #191

@nuest
Copy link
Member

nuest commented Jan 8, 2021

See also first changes in #199

@nuest
Copy link
Member

nuest commented May 28, 2021

It's enough for now that for our OJS use case that the use can set the important theme values manually.

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

4 participants