React Router > React TextArea with React hooks
Adding a React TextArea component with React hooks
Next, we want a description underneath the title of the mission. So we'll style a textarea
element in the same way we did with input. We'll also add state the same way by using the useState
hook. Check out NewMission.js
for that implemented.
import styled from "styled-components"; const StyledInput = styled.input` font-size: 32px; padding: 4px; border: 0px; outline: 0px; font-family: inherit; width: 100%; background: transparent; `; export const TextArea = styled.textarea` font-size: 22px; padding: 4px; border: 0px; outline: 0px; font-family: inherit; background: transparent; width: 100%; height: 100px; border: 1px solid silver; `; export default StyledInput;