textArea unified style

This commit is contained in:
Kalle (Sendou)
2020-10-12 00:16:31 +03:00
parent 06a684a222
commit 1afd1ae3d3
2 changed files with 7 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
import { Box, Textarea } from "@chakra-ui/core";
import React, { useContext } from "react";
import { Textarea, Box } from "@chakra-ui/core";
import Label from "./Label";
import MyThemeContext from "../../themeContext";
import Label from "./Label";
interface TextAreaProps {
value?: string;
@@ -21,7 +21,7 @@ const TextArea: React.FC<TextAreaProps> = ({
required,
height,
}) => {
const { themeColorHex, grayWithShade, darkerBgColor } = useContext(
const { themeColorWithShade, grayWithShade, darkerBgColor } = useContext(
MyThemeContext
);
@@ -31,12 +31,12 @@ const TextArea: React.FC<TextAreaProps> = ({
<Textarea
value={value ?? ""}
onChange={(e) => setValue(e.target.value)}
focusBorderColor={themeColorHex}
_focus={{ border: "1px solid", borderColor: themeColorWithShade }}
size="md"
height={height}
_hover={{}}
background={darkerBgColor}
borderColor="#CCCCCC"
borderColor={darkerBgColor}
/>
{limit && (
<Box

View File

@@ -12,14 +12,14 @@ export function useTheme(): Parameters<typeof extendTheme>[0] {
);
return {
components: {
Input: {
/*Input: {
baseStyle: {
field: {
bgColor: "black",
width: "50%"
}
}
},
},*/
Button: {
defaultProps: {
colorScheme: themeColor