Skip to content

Commit

Permalink
after review
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulZhemanov committed Sep 27, 2023
1 parent cadc123 commit 83b771b
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 81 deletions.
24 changes: 1 addition & 23 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react"
import "./App.css"
import styled from "@emotion/styled"
import { Column } from "./components/Flex"
import TodoList from "./components/Todolist"
import SizedBox from "./components/SizeBox"
import Header from "./components/Header"
Expand All @@ -13,44 +12,23 @@ const Root = styled.div`
box-sizing: border-box;
height: 100vh;
align-items: center;
/* background: #106c4e; */
`

const Body = styled.div`
display: flex;
justify-content: space-between;
height: 100vh;
padding: 0 10px;
flex: 1;
flex: 1;
min-width: 980px;
max-width: 1280px;
/* box-sizing: border-box; */
`

function App() {
return (
<Root>
<Header />
<Body>
{/* <Column>
<TodoList style={{ height: "100vh" }} />
</Column>{" "}
<SizedBox width={10} />
<Column>
<TodoList style={{ height: "100vh" }} />
</Column>{" "}
<SizedBox width={10} />
<Column>
<TodoList style={{ height: "100vh" }} />
</Column>{" "}
<SizedBox width={10} />
<Column>
<TodoList style={{ height: "100vh" }} />
</Column>
<SizedBox width={10} />
<Column>
<TodoList style={{ height: "100vh" }} />
</Column> */}
<TodoList />
<SizedBox width={10} />
<TodoList />
Expand Down
24 changes: 11 additions & 13 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Row } from "./Flex"
import SizedBox from "./SizeBox"
import add from "../assets/icons/Add.svg"

interface IProps { }
interface IProps {}

const Icon = styled.div`
width: 48px;
Expand All @@ -20,26 +20,24 @@ const Root = styled.div`
flex-direction: column;
padding: 0 10px 40px 10px;
align-items: flex-start;
/* background: #3612ba; */
min-width: 980px;
max-width: 1280px;
`
const Title = styled(Text)`
font-size: 64px;
font-weight: 700;
`
font-size: 64px;
font-weight: 700;
`
const SubTitile = styled(Text)`
font-size: 40px;
font-weight: 400;
`
font-size: 40px;
font-weight: 400;
`
const StyledRow = styled(Row)`
justify-content: flex-start;
align-items: center;
gap: 24px;
`
justify-content: flex-start;
align-items: center;
gap: 24px;
`

const Header: React.FC<IProps> = () => {

return (
<Root>
<Title>Project name</Title>
Expand Down
56 changes: 32 additions & 24 deletions src/components/Task.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
import styled from "@emotion/styled"
import React from "react"
import {Text} from "./Text"
import { Text } from "./Text"
import bin from "../assets/icons/Bin.svg"
import SizedBox from "./SizeBox"
import check from "../assets/icons/Check.svg"
import {Tag} from "./Tag"
import { Tag } from "./Tag"
import { Row } from "./Flex"

interface IProps {
align?: "row" | "column"
style?: React.CSSProperties
bodyStyle?: React.CSSProperties
align?: "row" | "column"
style?: React.CSSProperties
bodyStyle?: React.CSSProperties
}


const Root = styled.div`
display: flex;
flex-direction: column;
padding: 20px;
width: 423px;
/* height: 100vh; */
background: #f3f5f6;
/* flex: 1; */
/* align-items: center; */
border-radius: 12px;
background: #fff;
box-shadow: 0px 10px 0px 0px rgba(0, 0, 0, 0.15);
& .remove-task-button,
& .check-button {
display: none;
}
:hover {
& .remove-task-button,
& .check-button {
display: block;
}
}
`

const Bin = styled.div`
Expand Down Expand Up @@ -56,20 +64,20 @@ const StyledRow = styled(Row)`
align-items: center;
`


const Task: React.FC<IProps> = ({...props}) =>
<Root {...props}>
<StyledRow>
<TaskTitle>task title</TaskTitle>
<Bin/>
</StyledRow>
<SizedBox height={10}/>
<Description>task description</Description>
<SizedBox height={40}/>
<StyledRow>
<Tag>Critical</Tag>
<Check/>
</StyledRow>
</Root>
const Task: React.FC<IProps> = ({ ...props }) => (
<Root {...props}>
<StyledRow>
<TaskTitle>task title</TaskTitle>
<Bin className="remove-task-button" />
</StyledRow>
<SizedBox height={10} />
<Description>task description</Description>
<SizedBox height={40} />
<StyledRow>
<Tag>Critical</Tag>
<Check className="check-button" />
</StyledRow>
</Root>
)

export default Task
31 changes: 10 additions & 21 deletions src/components/Todolist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,26 @@ const Root = styled.div`
display: flex;
flex-direction: column;
padding: 25px 25px 40px 25px;
/* width: 423px; */
/* height: 100vh; */
background: #f3f5f6;
/* flex: 1; */
justify-content: space-between;
/* align-items: center; */
width: 100%;
& .remove-todolist-button{
& .remove-todolist-button {
display: none;
}
:hover{
& .remove-todolist-button{
display: block;
:hover {
& .remove-todolist-button {
display: block;
}
}
`

const Title = styled(Text)`
font-size: 28px;
font-weight: 600;
opacity: 0.8;
`
font-size: 28px;
font-weight: 600;
opacity: 0.8;
`

const HeaderContainer = styled.div`
display: flex;
Expand All @@ -59,26 +55,19 @@ const TasksContainer = styled.div`
flex-direction: column;
align-items: start;
height: 100%;
border: 1px solid #dadada;
/* align-items: center; */
& > * {
margin-bottom: 20px;
}
& > :last-child{
& > :last-child {
margin-bottom: 0;
}
`


const TodoList: React.FC<IProps> = () => {
// const StyledRow = styled(Row)`

// `
return (
<Root>
{/* <StyledRow> */}
<HeaderContainer>
<Title>Frontend</Title>
<Bin className="remove-todolist-button" />
Expand Down

0 comments on commit 83b771b

Please sign in to comment.