score:0

you can use react.statelesscomponent generic to pass your prop types as follows:

interface iheaderprops {
    current: number;
    total: number;
 }

const header:react.statelesscomponent<iheaderprops> =  (props) => {
  return (
    ...
  )
}

score:5

stepbar should accept a props object with members as current and total.

can you try using something like :

function stepbar(props: {current: number, total: number}) { ... }

Related Query

More Query from same tag