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

Button default styles

parent d6848a27
No related branches found
No related tags found
1 merge request!33Layouts themes
import React from "react";
import styled from "styled-components";
import { ButtonStyles } from "wax-prosemirror-themes";
const ButtonStyled = styled.button`
opacity: ${props => (props.select ? 1 : 0.4)};
pointer-events: ${props => (props.select ? "default" : "none")};
background: #fff;
border: none;
font-size: inherit;
cursor: pointer;
color: ${props =>
props.isActive ? props.theme.colorPrimary : props.theme.colorButton};
border-radius: 0;
padding: 5px 10px;
&:disabled {
color: #ccc;
pointer-events: none;
}
&:hover {
color: ${props => (props.isActive ? props.theme.colorPrimary : "#000")};
background: #f6f6f6;
}
${ButtonStyles};
`;
const Button = ({ view = {}, item }) => (
const tesy = ({ view = {}, item }) => (
<ButtonStyled
type="button"
isActive={item.active && item.active(view.state)}
......@@ -38,4 +29,4 @@ const Button = ({ view = {}, item }) => (
</ButtonStyled>
);
export default Button;
export default tesy;
export { default as cokoTheme } from "./src/coko-theme/index";
export { default as ButtonStyles } from "./src/coko-theme/elements/Button";
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";
......@@ -2,6 +2,8 @@
import "typeface-fira-sans-condensed";
import "typeface-vollkorn";
import { Button } from "./elements";
const cokoTheme = {
/* Colors */
colorBackground: "white",
......@@ -63,7 +65,11 @@ const cokoTheme = {
transitionTimingFunction: "ease",
transitionDelay: "0",
/* Breakpoints */
breakpoints: [480, 768, 1000, 1272]
breakpoints: [480, 768, 1000, 1272],
cssOverrides: {
Button
}
};
export default cokoTheme;
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