mirror of
https://github.com/r2r90/canvas-label.git
synced 2025-12-17 12:35:48 +00:00
work in progress
This commit is contained in:
37
src/components/layout/sidebar.tsx
Normal file
37
src/components/layout/sidebar.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Button } from "../ui/button";
|
||||
import { Input } from "../ui/input";
|
||||
|
||||
type Props = {
|
||||
handleImageUploaded: any;
|
||||
handleInputChange: any;
|
||||
inputText: any;
|
||||
handleTextAdd: any;
|
||||
};
|
||||
|
||||
export function Sidebar({
|
||||
handleImageUploaded,
|
||||
handleInputChange,
|
||||
handleTextAdd,
|
||||
inputText,
|
||||
}: Props) {
|
||||
return (
|
||||
<div className="flex flex-col ">
|
||||
<Input
|
||||
type="file"
|
||||
className="m-[2rem] w-auto "
|
||||
onChange={handleImageUploaded}
|
||||
/>
|
||||
<div className="m-[2rem] flex max-w-md justify-between">
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="enter the text"
|
||||
value={inputText}
|
||||
onChange={handleInputChange}
|
||||
/>
|
||||
<Button className="mx-[2rem] text-xs" onClick={handleTextAdd}>
|
||||
Add new Text
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user