Skip to content
Snippets Groups Projects
Commit ca6620e1 authored by chris's avatar chris
Browse files

add resolution

parent 8c09955a
No related branches found
No related tags found
1 merge request!36Fixes
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
"stylelint": "^8.2.0", "stylelint": "^8.2.0",
"svg-inline-loader": "^0.8.0" "svg-inline-loader": "^0.8.0"
}, },
"resolutions": {
"styled-components": "4.2.0"
},
"workspaces": [ "workspaces": [
"wax-prosemirror-core", "wax-prosemirror-core",
"wax-prosemirror-schema", "wax-prosemirror-schema",
......
import React from "react"; import React from "react";
import styled from "styled-components"; import styled from "styled-components";
import { override } from "@pubsweet/ui-toolkit"; import { ButtonStyles } from "wax-prosemirror-themes";
const ButtonStyled = styled.button` const ButtonStyled = styled.button`
opacity: ${props => (props.select ? 1 : 0.4)}; opacity: ${props => (props.select ? 1 : 0.4)};
...@@ -10,7 +10,7 @@ const ButtonStyled = styled.button` ...@@ -10,7 +10,7 @@ const ButtonStyled = styled.button`
&:hover { &:hover {
color: ${props => (props.isActive ? props.theme.colorPrimary : "#000")}; color: ${props => (props.isActive ? props.theme.colorPrimary : "#000")};
} }
${override("ui.Button")}; ${ButtonStyles};
`; `;
const Button = ({ view = {}, item }) => ( const Button = ({ view = {}, item }) => (
......
export { default as cokoTheme } from "./src/coko-theme/index"; export { default as cokoTheme } from "./src/coko-theme/index";
export {
default as ButtonStyles
} from "./src/coko-theme/elements/ButtonStyles";
import styled, { css } from "styled-components";
export default css`
background: #fff;
border: none;
font-size: inherit;
cursor: pointer;
border-radius: 0;
padding: 5px 10px;
&:disabled {
color: #ccc;
pointer-events: none;
}
&:hover {
background: #f6f6f6;
}
`;
export { default as Button } from "./Button"; export { default as ButtonStyles } from "./ButtonStyles";
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import "typeface-fira-sans-condensed"; import "typeface-fira-sans-condensed";
import "typeface-vollkorn"; import "typeface-vollkorn";
import { Button } from "./elements"; import { ButtonStyled } from "./elements";
const cokoTheme = { const cokoTheme = {
/* Colors */ /* Colors */
...@@ -69,7 +69,7 @@ const cokoTheme = { ...@@ -69,7 +69,7 @@ const cokoTheme = {
cssOverrides: { cssOverrides: {
ui: { ui: {
Button ButtonStyled
} }
} }
}; };
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment