Skip to content

Commit

Permalink
[feat] create ProgressBar component
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonhongberkeley committed Dec 28, 2024
1 parent 21840af commit c02c18f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions components/ProgressBar/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import * as styles from './styles';

const ProgressBar: React.FC = () => {
return (
<styles.ProgressBarContainer>
<styles.ProgressBarFiller progress={20}></styles.ProgressBarFiller>
</styles.ProgressBarContainer>
);
};

export default ProgressBar;
20 changes: 20 additions & 0 deletions components/ProgressBar/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import styled from 'styled-components';
import COLORS from '@/styles/colors';

export const ProgressBarContainer = styled.div`
display: inline;
width: 100%;
height: 2px;
background-color: ${COLORS.gray4};
border-radius: 2px;
margin-bottom: 2rem;
`;

export const ProgressBarFiller = styled.div<{
progress: number;
}>`
height: 100%;
width: ${props => props.progress}%;
background-color: ${COLORS.gray12};
transition: width 0.25s ease-in-out;
`;

0 comments on commit c02c18f

Please sign in to comment.