Install clsx and heroicons

This commit is contained in:
Lucàs
2023-06-16 20:19:14 +02:00
parent 8055a2ff90
commit 08e287444d
8 changed files with 35 additions and 19 deletions
+5 -12
View File
@@ -1,6 +1,7 @@
import {FormEvent, useState} from 'react';
import {useDispatch} from 'react-redux';
import {addTodo} from '../../features/todo/todoSlice.ts';
import {PlusIcon} from '@heroicons/react/24/outline';
export default function TodoAddItemForm() {
const [name, setName] = useState('');
@@ -17,20 +18,12 @@ export default function TodoAddItemForm() {
<form onSubmit={handleSubmit} className={'TodoAddItemForm'}>
<div className={'form-control'}>
<div className={'input-group'}>
<input type={'text'} value={name} placeholder={'Type here your task...'}
<input type={'text'} value={name}
placeholder={'Type here your task...'}
className={'input border-primary w-full'}
onChange={evt => setName(evt.target.value)}
/>
onChange={evt => setName(evt.target.value)}/>
<button type={'submit'} className={'btn btn-square btn-primary'}>
{/*Plus icon*/}
<svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6"
fill="none"
viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2">
<path strokeLinecap="round" strokeLinejoin="round"
d="M12 4v16m8-8H4"/>
</svg>
<PlusIcon className={"h-6 w-6"}/>
</button>
</div>
</div>