Skip to content

Commit

Permalink
added addtodo component and style
Browse files Browse the repository at this point in the history
  • Loading branch information
eyekavya committed Mar 22, 2023
1 parent 7910343 commit 75b946c
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
13 changes: 13 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

<link
href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap"
rel="stylesheet"
/>

<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>

<title>React App</title>
</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import "./App.css";

import React from "react";
import Heading from "./components/Heading/Heading";
import AddTodo from "./components/AddTodo/AddTodo";

function App() {
return (
<>
<Heading />
<AddTodo />
</>
);
}
Expand Down
19 changes: 19 additions & 0 deletions src/components/AddTodo/AddTodo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";
import { StyledAddTodo } from "./StyledAddTodo";

function AddTodo() {
return (
<StyledAddTodo>
<div class="flex-basic">
<form>
<input type="text" class="todo-input" />
<button type="submit" class="todo-btn">
<i class="fas fa-plus-square"></i>
</button>
</form>
</div>
</StyledAddTodo>
);
}

export default AddTodo;
35 changes: 35 additions & 0 deletions src/components/AddTodo/StyledAddTodo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import styled from "styled-components";

export const StyledAddTodo = styled.section`
.flex-basic {
display: flex;
align-items: center;
justify-content: center;
}
form {
display: flex;
justify-content: center;
align-items: center;
}
form input,
form button {
padding: 0.5rem;
background-color: #fff;
font-size: 1.2rem;
border: none;
outline: none;
}
form button {
color: #d88771;
cursor: pointer;
transition: all 0.3s ease;
}
form button:hover {
background-color: #d88771;
color: #fff;
}
`;

0 comments on commit 75b946c

Please sign in to comment.