Skip to content

Commit

Permalink
feat(react-tinacms-inline): InlineTextarea now accepts placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
ncphillips committed Aug 12, 2020
1 parent 1a47d0b commit 1be2566
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/react-tinacms-inline/src/fields/inline-textarea-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const InlineTextareaField = InlineTextarea
export function InlineTextarea({
name,
className,
placeholder,
focusRing = true,
}: InlineTextProps) {
const cms = useCMS()
Expand All @@ -42,12 +43,24 @@ export function InlineTextarea({
{({ input }) => {
if (cms.enabled) {
if (!focusRing) {
return <Textarea className={className} {...input} rows={1} />
return (
<Textarea
className={className}
{...input}
rows={1}
placeholder={placeholder}
/>
)
}

return (
<FocusRing name={name} options={focusRing}>
<Textarea className={className} {...input} rows={1} />
<Textarea
className={className}
{...input}
rows={1}
placeholder={placeholder}
/>
</FocusRing>
)
}
Expand Down

0 comments on commit 1be2566

Please sign in to comment.