fix: rename Labeled-Input size prop to variantSize
This commit is contained in:
parent
4772425abd
commit
aebbfb9f5d
2 changed files with 6 additions and 6 deletions
|
@ -28,7 +28,7 @@ export default function EventForm({ type = 'edit' }: eventFormProps) {
|
||||||
label='Event Name'
|
label='Event Name'
|
||||||
placeholder={type === 'create' ? 'New Event' : 'Event Name'}
|
placeholder={type === 'create' ? 'New Event' : 'Event Name'}
|
||||||
name='eventName'
|
name='eventName'
|
||||||
size='big'
|
variantSize='big'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='w-0 sm:w-[50px]'></div>
|
<div className='w-0 sm:w-[50px]'></div>
|
||||||
|
@ -77,7 +77,7 @@ export default function EventForm({ type = 'edit' }: eventFormProps) {
|
||||||
label='Event Description'
|
label='Event Description'
|
||||||
placeholder='What is the event about?'
|
placeholder='What is the event about?'
|
||||||
name='eventDescription'
|
name='eventDescription'
|
||||||
size='textarea'
|
variantSize='textarea'
|
||||||
></LabeledInput>
|
></LabeledInput>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default function LabeledInput({
|
||||||
placeholder,
|
placeholder,
|
||||||
value,
|
value,
|
||||||
name,
|
name,
|
||||||
size = 'default',
|
variantSize = 'default',
|
||||||
autocomplete,
|
autocomplete,
|
||||||
error,
|
error,
|
||||||
...rest
|
...rest
|
||||||
|
@ -17,14 +17,14 @@ export default function LabeledInput({
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
size?: 'default' | 'big' | 'textarea';
|
variantSize?: 'default' | 'big' | 'textarea';
|
||||||
autocomplete?: string;
|
autocomplete?: string;
|
||||||
error?: string;
|
error?: string;
|
||||||
} & React.InputHTMLAttributes<HTMLInputElement>) {
|
} & React.InputHTMLAttributes<HTMLInputElement>) {
|
||||||
return (
|
return (
|
||||||
<div className='grid grid-cols-1 gap-1'>
|
<div className='grid grid-cols-1 gap-1'>
|
||||||
<Label htmlFor={name}>{label}</Label>
|
<Label htmlFor={name}>{label}</Label>
|
||||||
{size === 'textarea' ? (
|
{variantSize === 'textarea' ? (
|
||||||
<Textarea
|
<Textarea
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
defaultValue={value}
|
defaultValue={value}
|
||||||
|
@ -40,7 +40,7 @@ export default function LabeledInput({
|
||||||
id={name}
|
id={name}
|
||||||
name={name}
|
name={name}
|
||||||
className={
|
className={
|
||||||
size === 'big'
|
variantSize === 'big'
|
||||||
? 'h-12 file:h-10 text-lg gplaceholder:text-lg sm:text-2xl sm:placeholder:text-2xl'
|
? 'h-12 file:h-10 text-lg gplaceholder:text-lg sm:text-2xl sm:placeholder:text-2xl'
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue