Skip to content

Commit

Permalink
Refactor the ProgressBar component to use TypeScript (#6245)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelzaleski authored Jun 21, 2023
1 parent 78bfefa commit 1ff019d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/dev-ts-refactor-progress-bar
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

minor tsx refactor
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
/** @format */
/**
* External dependencies
*/
import React from 'react';

/**
* Internal dependencies
*/
import './style.scss';

const ProgressBar = ( { progressLabel, totalLabel, progress } ) => {
interface ProgressBarProps {
progressLabel: string;
totalLabel: string;
progress: number;
}

const ProgressBar: React.FunctionComponent< ProgressBarProps > = ( {
progressLabel,
totalLabel,
progress,
} ) => {
const useInnerLabel = 0.5 < progress;
return (
<div className="progressbar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* External dependencies
*/
import { render } from '@testing-library/react';
import React from 'react';

/**
* Internal dependencies
Expand Down

0 comments on commit 1ff019d

Please sign in to comment.