aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Inputs/Code.js
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2021-03-05 23:12:28 -0800
committerjackyzha0 <[email protected]>2021-03-05 23:12:28 -0800
commit7a671bc96ef06df3da3d2dce3caca559f32c6627 (patch)
tree9af8330b8a8dd2a84f07d8c8d75a6245ce84b2dc /frontend/src/components/Inputs/Code.js
parentrefactoring css (diff)
downloadctrl-v-7a671bc96ef06df3da3d2dce3caca559f32c6627.tar.xz
ctrl-v-7a671bc96ef06df3da3d2dce3caca559f32c6627.zip
text area styling
Diffstat (limited to 'frontend/src/components/Inputs/Code.js')
-rw-r--r--frontend/src/components/Inputs/Code.js40
1 files changed, 19 insertions, 21 deletions
diff --git a/frontend/src/components/Inputs/Code.js b/frontend/src/components/Inputs/Code.js
index 1353d95..0fd6240 100644
--- a/frontend/src/components/Inputs/Code.js
+++ b/frontend/src/components/Inputs/Code.js
@@ -1,8 +1,7 @@
import React, {useEffect, useRef} from "react";
import * as indentation from "indent-textarea";
-import FloatingLabel from "../decorators/FloatingLabel";
import CharLimit from "../decorators/CharLimit";
-import {RelPositioning} from "./shared";
+import {Labelled} from "./shared";
export const Code = ({content, ...props}) => {
const textInput = useRef(null);
@@ -12,24 +11,23 @@ export const Code = ({content, ...props}) => {
}, [textInput])
return (
- <RelPositioning>
- <FloatingLabel
- label="content"
- id={props.id}
- value={content} />
- <textarea
- name="content"
- readOnly={props.readOnly}
- placeholder="Paste your text here"
- value={content}
- id={props.id}
- ref={textInput}
- required
- onChange={props.onChange}
- className="lt-shadow" />
- <CharLimit
- content={content}
- maxLength={props.maxLength} />
- </RelPositioning>
+ <Labelled
+ label="content"
+ id={props.id}
+ value={content}>
+ <textarea
+ name="content"
+ readOnly={props.readOnly}
+ placeholder="Paste your text here"
+ value={content}
+ id={props.id}
+ ref={textInput}
+ required
+ onChange={props.onChange}
+ className="lt-shadow" />
+ <CharLimit
+ content={content}
+ maxLength={props.maxLength} />
+ </Labelled>
);
} \ No newline at end of file