TextAreaAutoSize test

This commit is contained in:
Paul
2021-06-21 14:20:29 +01:00
parent 3c6e3b9fbf
commit d965b20ee2
3 changed files with 113 additions and 6 deletions

View File

@@ -4,15 +4,17 @@
// import { useState, useEffect, useRef, useLayoutEffect } from "preact/hooks";
import styled, { css } from "styled-components";
interface Props {
export interface TextAreaProps {
code?: boolean;
padding?: number;
}
export default styled.textarea<Props>`
export default styled.textarea<TextAreaProps>`
width: 100%;
resize: none;
display: block;
border-radius: 4px;
padding: ${ props => props.padding ?? 16 }px;
color: var(--foreground);
border: 2px solid transparent;