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

feature/add-ranking-list-component #8

Merged
merged 1 commit into from
Mar 2, 2023
Merged
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
feat: add ranking list component
  • Loading branch information
luc-mo committed Mar 2, 2023
commit 75fbb7c5abf15bcc7641f6e65ed5415dd35b4d13
14 changes: 14 additions & 0 deletions src/components/RankingList/RankingList.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as S from './RankingList.styles'
import { FC, ReactElement } from 'react'

export interface RankingListProps {
children: ReactElement | ReactElement[]
}

export const RankingList: FC<RankingListProps> = ({ children }): ReactElement => {
return (
<S.RankingListContainer>
<S.RankingList>{children}</S.RankingList>
</S.RankingListContainer>
)
}
19 changes: 19 additions & 0 deletions src/components/RankingList/RankingList.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import styled from 'styled-components'

export const RankingListContainer = styled.div`
width: 100%;
background-image: linear-gradient(to right, #3b82f6, #86efac, #9333ea);
padding: 6px;
border-radius: 2.6rem;
`

export const RankingList = styled.ol`
display: flex;
flex-direction: column;
gap: 2rem;
width: 100%;
height: 100%;
padding: 2rem;
background-color: #1e1e1e;
border-radius: 2rem;
`
2 changes: 2 additions & 0 deletions src/components/RankingList/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './RankingList.component';
export * as RankingListStyles from './RankingList.styles'