Skip to content
Closed
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
65 changes: 65 additions & 0 deletions components/Feature/Featured.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React from 'react'
import { ArrowUpward } from '@material-ui/icons'
import styled from 'styled-components'
import { featuredData } from '../dummyData'

const FeaturedContainer = styled.div`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Dhanush, Please convert the CSS to a normal .css file for now only one file uses styled components I think we don't need it I will discuss and remove styled components.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup sure,
Will change it to normal CSS.

width: 100%;
display: flex;
justify-content: space-between;
`
const FeaturedItem = styled.div`
flex: 1;
margin: 0px 20px;
padding: 30px;
border-radius: 10px;
cursor: pointer;
box-shadow: 0px 0px 15px -10px rgba(0, 0, 0, 0.75);
`
const FeaturedTitle = styled.span`
font-size: 20px;
`
const FeaturedMoneyContainer = styled.div`
margin: 10px 0px;
display: flex;
align-items: center;
.featuredMoney{
font-size: 30px;
font-weight: 600;
}
.featuredMoneyRate{
display: flex;
align-items: center;
margin-left: 20px;
}
.featuredIcon{
font-size: 14px;
margin-left: 5px;
color: green;
}
`
const FeaturedSub = styled.span`
font-size: 15px;
color: gray;
`

const Featured = () => {
return (
<FeaturedContainer>
{featuredData && featuredData.map((item, index) => (
<FeaturedItem key={index}>
<FeaturedTitle>{item.title}</FeaturedTitle>
<FeaturedMoneyContainer>
<span className="featuredMoney">{item.money}</span>
<span className="featuredMoneyRate">
{item.moneyRate} <ArrowUpward className="featuredIcon" />
</span>
</FeaturedMoneyContainer>
<FeaturedSub>Compared to Previous month</FeaturedSub>
</FeaturedItem>
))}
</FeaturedContainer>
)
}

export default Featured
Empty file added components/Feature/feature.css
Empty file.
Loading