themable colors

This commit is contained in:
Jan Prochazka
2020-11-11 18:30:44 +01:00
parent 98d7b3c6b9
commit 4ef7f275e6
8 changed files with 84 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
// @ts-nocheck
import React from 'react';
import styled from 'styled-components';
import useTheme from '../theme/useTheme';
// import theme from '../theme';
import { useLeftPanelWidth } from '../utility/globalState';
@@ -62,14 +63,15 @@ const StyledWidgetTitle = styled.div`
padding: 5px;
font-weight: bold;
text-transform: uppercase;
background-color: gray;
border: 1px solid #aaa;
// background-color: #CEC;
background-color: ${(props) => props.theme.widgetTitleBackground};
border: 1px solid ${(props) => props.theme.border};
`;
export function WidgetTitle({ children, inputRef = undefined, onClick = undefined }) {
const theme = useTheme();
return (
<StyledWidgetTitle
theme={theme}
onClick={() => {
if (inputRef && inputRef.current) inputRef.current.focus();
if (onClick) onClick();