mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
organize components in folders, dependency: add sass
This commit is contained in:
24
components/input/index.js
Normal file
24
components/input/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user