Allow set a name for textarea message

This commit is contained in:
prototypa
2024-03-25 08:18:12 -04:00
parent fc2012b52c
commit 5e8bb02ab8
2 changed files with 5 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
</label>
<textarea
id="textarea"
name="textarea"
name={textarea.name ? textarea.name : 'message'}
rows={textarea.rows ? textarea.rows : 4}
placeholder={textarea.placeholder}
class="py-3 px-4 block w-full text-md rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900"
@@ -70,7 +70,9 @@ const { inputs, textarea, disclaimer, button = 'Contact us', description = '' }
{
button && (
<div class="mt-10 grid">
<Button variant="primary" type="submit">{button}</Button>
<Button variant="primary" type="submit">
{button}
</Button>
</div>
)
}

1
src/types.d.ts vendored
View File

@@ -166,6 +166,7 @@ export interface Input {
export interface Textarea {
label?: string;
name: string;
placeholder?: string;
rows?: number;
}