fix: rename Labeled-Input size prop to variantSize
This commit is contained in:
parent
505ad6cbfe
commit
07be9a02b6
2 changed files with 6 additions and 6 deletions
|
@ -28,7 +28,7 @@ export default function EventForm({ type = 'edit' }: eventFormProps) {
|
|||
label='Event Name'
|
||||
placeholder={type === 'create' ? 'New Event' : 'Event Name'}
|
||||
name='eventName'
|
||||
size='big'
|
||||
variantSize='big'
|
||||
/>
|
||||
</div>
|
||||
<div className='w-0 sm:w-[50px]'></div>
|
||||
|
@ -77,7 +77,7 @@ export default function EventForm({ type = 'edit' }: eventFormProps) {
|
|||
label='Event Description'
|
||||
placeholder='What is the event about?'
|
||||
name='eventDescription'
|
||||
size='textarea'
|
||||
variantSize='textarea'
|
||||
></LabeledInput>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@ export default function LabeledInput({
|
|||
placeholder,
|
||||
value,
|
||||
name,
|
||||
size = 'default',
|
||||
variantSize = 'default',
|
||||
autocomplete,
|
||||
error,
|
||||
...rest
|
||||
|
@ -17,14 +17,14 @@ export default function LabeledInput({
|
|||
placeholder?: string;
|
||||
value?: string;
|
||||
name?: string;
|
||||
size?: 'default' | 'big' | 'textarea';
|
||||
variantSize?: 'default' | 'big' | 'textarea';
|
||||
autocomplete?: string;
|
||||
error?: string;
|
||||
} & React.InputHTMLAttributes<HTMLInputElement>) {
|
||||
return (
|
||||
<div className='grid grid-cols-1 gap-1'>
|
||||
<Label htmlFor={name}>{label}</Label>
|
||||
{size === 'textarea' ? (
|
||||
{variantSize === 'textarea' ? (
|
||||
<Textarea
|
||||
placeholder={placeholder}
|
||||
defaultValue={value}
|
||||
|
@ -40,7 +40,7 @@ export default function LabeledInput({
|
|||
id={name}
|
||||
name={name}
|
||||
className={
|
||||
size === 'big'
|
||||
variantSize === 'big'
|
||||
? '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