import React from 'react'; import styled from 'styled-components'; import { InlineField, FocusRing, InlineTextProps } from 'react-tinacms-inline'; import { useCMS } from 'tinacms'; import TextareaAutosize from 'react-textarea-autosize'; export interface InlineTranslatedTextAreaProps extends InlineTextProps { children?: React.ReactNode; placeholder?: string; } export function InlineTranslatedTextArea({ name, className, focusRing = true, placeholder, children, }: InlineTranslatedTextAreaProps) { const cms = useCMS(); return ( {({ input }) => { if (cms.enabled) { if (!focusRing) { return (