Editor placeholder

This commit is contained in:
Gregory Schier
2023-03-01 14:22:10 -08:00
parent 61fe95b300
commit 70f534f1d8
2 changed files with 16 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import type { InputHTMLAttributes, ReactNode } from 'react';
import classnames from 'classnames';
import { placeholders } from './Editor/widgets';
import { HStack, VStack } from './Stacks';
import Editor from './Editor/Editor';
@@ -25,6 +26,7 @@ export function Input({
containerClassName,
labelClassName,
onSubmit,
placeholder,
useTemplating,
size = 'md',
useEditor,
@@ -68,6 +70,7 @@ export function Input({
defaultValue={defaultValue}
onChange={onChange}
onSubmit={onSubmit}
placeholder={placeholder}
className={classnames(
className,
'bg-transparent min-w-0 pl-3 pr-2 h-full w-full focus:outline-none',
@@ -79,6 +82,8 @@ export function Input({
<input
id={id}
onChange={(e) => onChange?.(e.target.value)}
placeholder={placeholder}
defaultValue={defaultValue}
className={classnames(
className,
'bg-transparent min-w-0 pl-3 pr-2 h-full w-full focus:outline-none',