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
Projects

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 nuest added this to Backlog in UI via automation Jan 4, 2021
@nuest nuest moved this from Backlog to Sprint until next release in UI Jan 4, 2021
@nuest nuest moved this from Sprint until next release to Next in UI Jan 4, 2021
@nuest
Copy link
Member

nuest commented Jan 8, 2021

See also first changes in #199

@nuest nuest moved this from Next to Sprint until next release in UI Apr 30, 2021
@njakuschona njakuschona moved this from Sprint until next release to In progress in UI May 22, 2021
@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.

@nuest nuest moved this from In progress to Sprint until next release in UI May 28, 2021
njakuschona added a commit to njakuschona/o2r-UI that referenced this issue Jul 17, 2021
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
UI
  
Sprint until next release
Development

No branches or pull requests

4 participants