Update all the shit
This commit is contained in:
@ -2,13 +2,14 @@ package components
|
||||
|
||||
type InputProps struct {
|
||||
Name string
|
||||
Type string
|
||||
Value string
|
||||
Error string
|
||||
Placeholder string
|
||||
}
|
||||
|
||||
templ Input(props InputProps) {
|
||||
<input type="text" name={ props.Name } id={ props.Name } value={ props.Value } class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" placeholder={ props.Placeholder } required/>
|
||||
<input type={ props.Type } name={ props.Name } id={ props.Name } value={ props.Value } class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white" placeholder={ props.Placeholder } required/>
|
||||
if props.Error != "" {
|
||||
<span class="text-red-500">{ props.Error }</span>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user