Commit d244c658 by Sujeeth AV

Initial commit

parents
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
{
"todos": [
{
"id": "2e07",
"task": "yuicxavv7i7vvsdca",
"completed": false
},
{
"id": "653e",
"task": " s s",
"completed": false
}
]
}
\ No newline at end of file
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "todo",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.9.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-icons": "^5.5.0"
},
"devDependencies": {
"@eslint/js": "^9.25.0",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"eslint": "^9.25.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"vite": "^6.3.5"
}
}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
import axios from "axios";
const URL = 'http://192.168.1.64:3004/todos';
export const getTodo = () => axios.get(URL);
export const addTodo = (task) => axios.post(URL, { task, completed: false });
export const delTodo = (id) => axios.delete(`${URL}/${id}`);
export const uptTodo = (id, updateTodo) => axios.put(`${URL}/${id}`, updateTodo);
import { Main } from "./todo/todolist/Index"
import './global.css'
function App() {
return (
<>
<Main/>
</>
)
}
export default App
import React, { createContext, useState, useRef, useEffect, useCallback } from 'react';
import { getTodo, addTodo, delTodo, uptTodo } from '../../API/Api'
import { Header } from '../../Layout/card/Index';
import styles from'./styles.module.css';
import List from '../../todo/List/Index';
export const MyTask = createContext();
const debounce = (func, delay) => {
let timeoutId;
return function(...args) {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
func.apply(this, args);
}, delay);
};
};
export const Input = () => {
const [task, setTask] = useState("");
const [store, setStore] = useState([]);
const [editIndex, setEditIndex] = useState(null);
const [editedTask, setEditedTask] = useState("");
const [loading, setLoading] = useState(false);
const editableRef = useRef(null);
const lastCursorPos = useRef(0);
const fetchTodos = useCallback(async () => {
try {
setLoading(true);
const res = await getTodo();
setStore(res.data || []);
} catch (error) {
console.error("Failed to fetch todos:", error);
} finally {
setLoading(false);
}
}, []);
useEffect(() => {
fetchTodos();
}, [fetchTodos]);
const saveCursorPosition = () => {
try {
if (editableRef.current) {
const selection = window.getSelection();
if (selection.rangeCount > 0) {
const range = selection.getRangeAt(0);
const preCaretRange = range.cloneRange();
preCaretRange.selectNodeContents(editableRef.current);
preCaretRange.setEnd(range.endContainer, range.endOffset);
lastCursorPos.current = preCaretRange.toString().length;
}
}
} catch (error) {
console.error("Error saving cursor position:", error);
}
};
const restoreCursorPosition = () => {
try {
if (editableRef.current) {
const range = document.createRange();
const selection = window.getSelection();
let found = false;
const findPosition = (node, remainingPos) => {
if (node.nodeType === Node.TEXT_NODE) {
const length = node.nodeValue.length;
if (remainingPos <= length) {
range.setStart(node, remainingPos);
found = true;
return;
}
remainingPos -= length;
} else {
for (let i = 0; i < node.childNodes.length && !found; i++) {
findPosition(node.childNodes[i], remainingPos);
}
}
};
findPosition(editableRef.current, lastCursorPos.current);
if (!found) {
range.selectNodeContents(editableRef.current);
range.collapse(false);
} else {
range.collapse(true);
}
selection.removeAllRanges();
selection.addRange(range);
}
} catch (error) {
console.error("Error restoring cursor position:", error);
}
};
useEffect(() => {
if (editableRef.current && editIndex !== null) {
try {
editableRef.current.focus();
setTimeout(restoreCursorPosition, 0);
} catch (error) {
console.error("Error focusing editable element:", error);
setEditIndex(null);
}
}
}, [editIndex, editedTask]);
const debouncedSave = useCallback(
debounce(async (id, newTask) => {
try {
const todo = store.find(item => item.id === id);
if (todo && todo.task !== newTask) {
await uptTodo(id, {
id: todo.id,
task: newTask,
completed: todo.completed
});
}
} catch (error) {
console.error("Error saving todo:", error);
}
}, 500),
[store]
);
const handleChange = (e) => setTask(e.target.value);
const handleEdit = (e) => {
try {
saveCursorPosition();
const newValue = e.currentTarget.textContent;
setEditedTask(newValue);
const newStore = [...store];
newStore[editIndex] = { ...newStore[editIndex], task: newValue };
setStore(newStore);
debouncedSave(store[editIndex].id, newValue);
} catch (error) {
console.error("Error during edit:", error);
setEditIndex(null);
}
};
const startEdit = (index) => {
try {
setEditIndex(index);
setEditedTask(store[index].task);
} catch (error) {
console.error("Error starting edit:", error);
setEditIndex(null);
}
};
const endEdit = () => {
setEditIndex(null);
};
const Add = async () => {
if (task.trim() === '') return;
try {
const res = await addTodo(task);
setStore([...store, res.data]);
setTask("");
} catch (error) {
console.error("Error adding todo:", error);
}
};
const Delete = async (id) => {
const confirmDelete = window.confirm("Are you sure you want to delete?");
if (confirmDelete) {
try {
await delTodo(id);
setStore(store.filter(item => item.id !== id));
} catch (error) {
console.error("Error deleting todo:", error);
}
}
};
const toggleComplete = async (index) => {
try {
const newStore = [...store];
newStore[index] = {
...newStore[index],
completed: !newStore[index].completed
};
setStore(newStore);
await uptTodo(newStore[index].id, newStore[index]);
} catch (error) {
console.error("Error toggling complete:", error);
fetchTodos();
}
};
const renderEditableContent = () => {
try {
return (
<div
ref={editableRef}
contentEditable
suppressContentEditableWarning
onBlur={endEdit}
onInput={handleEdit}
onKeyDown={(e) => {
if (e.key === 'Enter') {
e.preventDefault();
e.currentTarget.blur();
}
}}
className={`${styles.task} ${store[editIndex]?.completed ? 'completed' : ''}`}
>
{editedTask}
</div>
);
} catch (error) {
console.error("Error rendering editable content:", error);
return (
<span
className={`${styles.task} ${store[editIndex]?.completed ? styles.completed : ''}`}
onClick={() => startEdit(editIndex)}
>
{typeof store[editIndex]?.task === 'string'
? store[editIndex].task
: JSON.stringify(store[editIndex]?.task)}
</span>
);
}
};
return (
<MyTask.Provider value={{ store, setStore }}>
<div className="todo-container">
<Header/>
<List
store={store}
editIndex={editIndex}
renderEditableContent={renderEditableContent}
startEdit={startEdit}
toggleComplete={toggleComplete}
Delete={Delete}
/>
<form onSubmit={(e) => e.preventDefault()}>
<div className={styles.merge}>
<input
type="text"
className={styles.input}
placeholder="Enter Items"
value={task}
onChange={handleChange}
disabled={loading}
/>
<button
onClick={Add}
className={styles.button}
disabled={loading || !task.trim()}
>
{loading ? 'Adding...' : 'Submit'}
</button>
</div>
</form>
</div>
</MyTask.Provider>
);
};
.todo-container {
max-width: 500px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.MyTask {
max-width: 500px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
h2,
ul,
li,
form,
.merge {
margin: 0;
padding: 0;
}
.todo {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.task {
flex: 1;
cursor: text;
padding: 4px 0;
font-size: 1rem;
white-space: pre-wrap;
word-break: break-word;
margin-left: 1rem;
transition: all 0.3s ease;
font-size: 1.5rem;
color: #434343;
}
.task[contenteditable="true"] {
outline: none;
border-bottom: 1px dashed #aaa;
padding: 4px;
display: inline-block;
min-width: 0;
width: auto;
flex-grow: 1;
}
.merge {
display: flex;
gap: 10px;
margin-top: 20px;
}
.input {
flex: 1;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 1.2rem;
transition: border 0.2s ease;
color: #a0a0a0;
min-width: 18.5rem;
margin-left: 2rem;
}
.input:focus {
outline: none;
}
.button {
color: black;
border: none;
border-radius: 6px;
background-color: #fff;
cursor: pointer;
font-size: 1rem;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
border: 1px solid #ddd;
}
.todo.completed .task {
text-decoration: line-through;
color: #434343;
opacity: 0.8;
}
.error-fallback {
color: #ff4444;
padding: 8px;
border: 1px solid #ffcccc;
background: #fffafa;
}
.completed {
text-decoration: line-through;
color: #434343;
opacity: 0.8;
}
@media (max-width: 640px) {
.MyTask {
padding: 15px;
}
.task {
padding: 3px 0 10px;
}
.merge {
display: flex;
flex-direction: column;
gap: 0;
}
.button {
padding: 10px;
width: 100%;
}
.input {
margin-left: 0;
}
}
input {
height: 2.5rem;
max-width: 18.5rem;
box-sizing: border-box;
}
button {
height: 2rem;
text-align: center;
padding: 2px;
}
.task {
font-size: 1.2rem;
}
[contenteditable]:focus {
outline: none;
border: none;
}
span[contenteditable] {
border-bottom: 1px dashed #ccc;
cursor: text;
}
@media (min-width: 768px) {
.check input {
height: 1rem;
width: 1rem;
}
.todo {
padding: 0 1.3rem 0;
}
.input {
padding: 1.5rem;
min-width: 500px;
}
}
import React,{useContext} from 'react'
import { MyTask } from '../../Form/form/Index';
import styles from './styles.module.css';
export const Header = () => {
const {store}=useContext(MyTask);
console.log('store:',store)
return (
<header className={styles.head}>
<h2>You have {store.length} Todos </h2>
</header>
)
}
.head {
width: 100%;
background-color: #ffffff;
font-weight: bold;
font-size: 16px;
box-shadow: 0 1px rgb(217, 217, 217);
color: rgba(20, 10, 0, 255);
text-align: center;
margin-bottom: 1rem;
padding: 1rem;
}
import React from 'react';
import styles from './styles.module.css';
export const Checkbox = ({ checked, onChange, id }) => {
const handleChange = (e) => {
console.log('Checkbox clicked, checked:', e.target.checked);
if (onChange) {
onChange(e);
}
};
return (
<div className={styles.check}>
<input
type="checkbox"
id={`checkbox-${id}`}
checked={checked}
onChange={handleChange}
className={styles.customCheckbox}
/>
</div>
);
};
.check input[type="checkbox"] {
flex-shrink: 0;
}
.check input {
border: 2px solid #888;
}
input[type="checkbox"]:hover {
border-color: #888;
}
input[type="checkbox"]:checked {
background-color: white;
border-color: #888;
}
input[type="checkbox"]:checked::after {
content: "";
position: absolute;
left: 3px;
top: 2px;
width: 4px;
height: 8px;
border: solid #333;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
@media (min-width: 768px) {
.check input {
height: 1.5rem;
width: 1.5rem;
margin-left: 2rem;
}
input[type="checkbox"]:checked::after {
left: 3px;
top: 1px;
width: 4px;
height: 8px;
}
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, sans-serif;
background-color: #f5f5f5;
margin: 0;
padding: 20px;
color: #333;
}
button {
height: 2.5rem;
margin-top: 0.47rem;
width: 15%;
}
input {
width: 75%;
max-width: unset;
margin-top: 0.5rem;
}
ul {
list-style: none;
word-break: break-word;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: 0;
margin: 0 0 1.5rem 0;
padding: 0;
}
input {
height: 2.5rem;
max-width: 18.5rem;
box-sizing: border-box;
}
h2,
ul,
li,
form,
.merge {
margin: 0;
padding: 0;
}
li {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 0;
margin-bottom: 0.5rem;
box-shadow: 0 1px rgb(217, 217, 217);
}
ul li:last-child {
box-shadow: none;
}
input {
height: 2.5rem;
max-width: 18.5rem;
box-sizing: border-box;
}
[contenteditable]:focus {
outline: none;
border: none;
}
span[contenteditable] {
border-bottom: 1px dashed #ccc;
cursor: text;
}
@media (min-width: 768px) {
button {
height: 3.1rem;
text-align: center;
padding: 2px;
}
li {
padding: 0 1rem 0 2rem;
}
}
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.jsx'
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)
import React from "react";
import { MdCancel } from "react-icons/md";
import { Checkbox } from "../../components/base/Index";
import styles from './styles.module.css';
const List = ({
store,
editIndex,
renderEditableContent,
startEdit,
toggleComplete,
Delete
}) => {
return (
<ul className={styles.scroll}>
{store.map((item, index) => {
if (!item || typeof item.task === 'undefined') return null;
return (
<li key={item.id ?? index} className={`${styles.todo} ${item.completed ? styles.completed : ""}`}>
<div className={styles.check}>
<Checkbox
checked={item.completed}
onChange={() => toggleComplete(index)}
id={item.id}
/>
{editIndex === index ? (
renderEditableContent()
) : (
<span
className={`${styles.task} ${item.completed ? styles.completed : ''}`}
onClick={() => startEdit(index)}
>
{typeof item.task === 'string'
? item.task
: JSON.stringify(item.task)}
</span>
)}
</div>
<button className={styles.delete} onClick={() => Delete(item.id)}>
<MdCancel />
</button>
</li>
);
})}
</ul>
);
};
export default List;
/* .container {
width: 100vw;
max-width: 300px;
min-height: 20svh;
margin: 0 auto;
display: flex;
flex-direction: column;
flex-shrink: 1;
}
.check {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
min-width: 0;
}
.todo.completed .task {
text-decoration: line-through;
color: #434343;
opacity: 0.8;
}
.check input[type="checkbox"] {
flex-shrink: 0;
}
.check input {
border: 2px solid #888;
}
input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 20px;
height: 20px;
border-radius: 4px;
outline: none;
cursor: pointer;
position: relative;
transition: all 0.2s ease;
}
input[type="checkbox"]:hover {
border-color: #888;
}
input[type="checkbox"]:checked {
background-color: white;
border-color: #888;
}
input[type="checkbox"]:checked::after {
content: "";
position: absolute;
left: 3px;
top: 2px;
width: 4px;
height: 8px;
border: solid #333;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
input[type="checkbox"] {
width: 10px;
height: 0px;
}
input[type="checkbox"]:checked::after {
top: 1px;
}
ul {
list-style: none;
word-break: break-word;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: 0;
margin-left: 1rem;
}
.scroll {
max-height: 500px;
overflow-y: auto;
padding-right: 6px;
margin-bottom: 0;
}
.merge {
display: flex;
flex-direction: column;
width: 100%;
}
.delete {
border: none;
background: none;
cursor: pointer;
padding: 0;
color: #888;
transition: color 0.2s ease;
}
.delete svg {
height: 33px;
width: 28px;
color: rgba(204, 204, 204, 255);
}
.delete svg:hover {
color: #ff4444;
}
@media (min-width: 768px) {
.wrapper {
display: flex;
justify-content: space-between;
max-width: 700px;
min-height: 15svh;
align-items: unset;
}
.container {
max-width: 750px;
min-height: 25svh;
}
input {
width: 75%;
max-width: unset;
margin-top: 0.5rem;
}
.input {
margin-left: 1.3rem;
padding: 1.8rem;
box-shadow: 1px 1px 1px rgb(159, 159, 159) inset;
}
.button {
padding: 1.8rem;
display: flex;
align-items: center;
box-shadow: 0.5px 0.5px 0.5px rgb(159, 159, 159);
}
button {
height: 2.5rem;
margin-top: 0.47rem;
width: 15%;
}
.delete {
width: 8%;
}
.merge {
flex-direction: row;
width: 98.5%;
margin: 0;
}
.check {
gap: 0;
}
.check input {
height: 1rem;
width: 1rem;
}
input[type="checkbox"]:checked::after {
left: 3px;
top: 1px;
width: 4px;
height: 8px;
}
} */
.todoContainer {
width: 100vw;
max-width: 300px;
min-height: 20svh;
margin: 0 auto;
display: flex;
flex-direction: column;
flex-shrink: 1;
}
.scroll {
max-height: 500px;
overflow-y: auto;
padding-right: 6px;
margin-bottom: 0;
}
.merge {
display: flex;
flex-direction: column;
width: 100%;
}
.todo {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.5rem 0;
}
.completed .task {
text-decoration: line-through;
color: #434343;
opacity: 0.8;
}
.task {
cursor: pointer;
word-break: break-word;
}
.check {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
min-width: 0;
}
.checkbox {
appearance: none;
width: 20px;
height: 20px;
border: 2px solid #888;
border-radius: 4px;
cursor: pointer;
position: relative;
transition: all 0.2s ease;
flex-shrink: 0;
padding-left: 2rem;
}
.checkbox:hover {
border-color: #888;
}
.checkbox:checked {
background-color: white;
border-color: #888;
}
.checkbox:checked::after {
content: "";
position: absolute;
left: 3px;
top: 2px;
width: 4px;
height: 8px;
border: solid #333;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.delete {
border: none;
background: none;
cursor: pointer;
padding: 0;
color: #888;
transition: color 0.2s ease;
}
.delete svg {
height: 33px;
width: 28px;
color: rgba(204, 204, 204, 255);
}
.delete svg:hover {
color: #ff4444;
}
@media (min-width: 768px) {
.wrapper {
display: flex;
justify-content: space-between;
max-width: 700px;
min-height: 15svh;
}
.todoContainer {
max-width: 750px;
min-height: 25svh;
}
.merge {
flex-direction: row;
width: 98.5%;
margin: 0;
}
.check {
gap: 0;
}
.checkbox {
width: 1rem;
height: 1rem;
}
.checkbox:checked::after {
top: 1px;
}
}
import React from 'react'
import styles from './styles.module.css'
import { Input } from '../../Form/form/Index'
export const Main = () => {
return (
<>
<div className={styles.container}>
<div className={styles.wrapper}>
<Input/>
</div>
</div></>
)
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
background: #ffffff;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-image: radial-gradient(#ccc 0.5px, transparent 1px);
background-size: 10px 10px;
}
.container {
width: 100vw;
max-width: 300px;
min-height: 20svh;
margin: 0 auto;
display: flex;
flex-direction: column;
flex-shrink: 1;
}
.wrapper {
width: 100%;
max-width: 300px;
margin: 0 auto;
background-color: #ffffff;
display: flex;
padding: 2px;
flex-direction: column;
justify-content: center;
box-shadow: 0 3px 3px rgb(217, 217, 217);
}
input {
max-width: 18.5rem;
padding: 0.4rem;
font-size: 1rem;
margin-bottom: 0.5rem;
}
.button {
display: flex;
align-items: center;
justify-content: center;
padding: 1.4rem;
}
.merge button:hover {
background-color: #58d4fc;
color: #fff;
}
.button button {
height: 1rem;
width: 18.5rem;
text-align: center;
border: 2px solid rgb(120, 120, 120);
padding: 1px;
cursor: pointer;
background-color: #f0f0f0;
}
ul {
list-style: none;
word-break: break-word;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: 0;
font-size: 20px;
}
@media (min-width: 768px) {
.wrapper {
display: flex;
justify-content: space-between;
max-width: 650px;
min-height: 15svh;
align-items: unset;
}
.container {
max-width: 750px;
min-height: 25svh;
}
input {
width: 75%;
max-width: unset;
margin-top: 0.5rem;
}
.input {
margin-left: 1.3rem;
padding: 1.8rem;
box-shadow: 1px 1px 1px rgb(159, 159, 159) inset;
}
.button {
padding: 1.8rem;
display: flex;
align-items: center;
box-shadow: 0.5px 0.5px 0.5px rgb(159, 159, 159);
}
.delete {
width: 2%;
}
.merge {
flex-direction: row;
flex-shrink: 1;
width: 98.5%;
margin: 0;
}
.check {
gap: 0;
}
}
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: true, // or '0.0.0.0' for external access
port: 5173
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment