MCPcopy Create free account
hub / github.com/dailydotdev/apps / ProgressBar

Function ProgressBar

packages/shared/src/components/fields/ProgressBar.tsx:21–50  ·  view source on GitHub ↗
({
  percentage,
  className = {},
  shouldShowBg,
}: ProgressBarProps)

Source from the content-addressed store, hash-verified

19}
20
21export function ProgressBar({
22 percentage,
23 className = {},
24 shouldShowBg,
25}: ProgressBarProps): ReactElement {
26 return (
27 <ConditionalWrapper
28 condition={shouldShowBg ?? false}
29 wrapper={(component) => (
30 <span
31 className={classNames(
32 'flex w-full overflow-hidden bg-accent-pepper-subtler',
33 className?.wrapper,
34 )}
35 >
36 {component}
37 </span>
38 )}
39 >
40 <meter
41 className={classNames(
42 'appearance-none transition-[width]',
43 className?.bar,
44 className?.barColor ?? 'bg-accent-cabbage-default',
45 )}
46 style={{ width: `${percentage >= 0 ? percentage : 0}%` }}
47 />
48 </ConditionalWrapper>
49 );
50}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected