mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 13:47:49 +00:00
25 lines
645 B
JavaScript
25 lines
645 B
JavaScript
export function Option({ children, ...props }) {
|
|
return <option {...props}>{children}</option>;
|
|
}
|
|
|
|
export function Select({ id, label, children, ...props }) {
|
|
return (
|
|
<div>
|
|
<select name={label} id={id} {...props}>
|
|
{children}
|
|
</select>
|
|
{/* TODO: parentheses around label w/ css */}
|
|
<label htmlFor={id}>{label}</label>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export function NumberInput({ id, label, ...props }) {
|
|
return (
|
|
<div>
|
|
<input {...props} type='number' id={id} name={label} />
|
|
<label htmlFor={id}>{label}</label>
|
|
</div>
|
|
);
|
|
}
|