Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital/checkpoint/wave 00 Vite Updates #8

Open
wants to merge 2 commits into
base: mikellewade/vite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import TaskList from './components/TaskList.jsx';
import './App.css';

Expand Down
10 changes: 9 additions & 1 deletion src/components/Task.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,17 @@
button.tasks__item__remove {
top: 50%;
right: 0;
height: 100%;
height: 1;
background-color: #1779ba;
color: white;
border: none;
width: 2.5em;
/* transform: translateY(-50%); */
/* padding: 0.85em 2.25em 0.85em 1em; */
font-size: 100%;
margin: 0;
}

button.tasks__item__remove:hover {
background-color: #0f6d9c;
}
11 changes: 1 addition & 10 deletions src/components/Task.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';

import './Task.css';

const Task = ({ id, title, isComplete }) => {
const [complete, setComplete] = useState(isComplete);
const buttonClass = complete ? 'tasks__item__toggle--completed' : '';

return (
<li className="tasks__item">
<button
className={`tasks__item__toggle ${buttonClass}`}
onClick={() => setComplete(!complete)}
>
{title}
</button>
<button className="tasks__item__toggle">{title}</button>
<button className="tasks__item__remove button">x</button>
</li>
);
Expand Down
1 change: 0 additions & 1 deletion src/components/TaskList.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import Task from './Task.jsx';
import './TaskList.css';
Expand Down