organize components in folders, dependency: add sass

This commit is contained in:
andr-ew
2023-07-03 13:56:57 -05:00
parent 71fd397a2c
commit dac820b480
8 changed files with 23 additions and 21 deletions

24
components/input/index.js Normal file
View 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>
);
}