diff options
Diffstat (limited to 'frontend/src/components/Inputs/Code.js')
| -rw-r--r-- | frontend/src/components/Inputs/Code.js | 40 |
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 |