Dev Helpers
← Back

Deposit split schedule

Import and render <DepositSplitSchedule /> in a React project.

Open this example in the interactive library

Live preview

Source code

// components/DepositSplitSchedule.tsx

export default function DepositSplitSchedule({
  hours = 8,
  rate = 60,
}: { hours?: number; rate?: number } = {}) {
  const total = hours * rate;
  return (
    <dl>
      <dt>Deposit 30%</dt>
      <dd>{(total * 0.3).toFixed(2)}</dd>
      <dt>On delivery</dt>
      <dd>{(total * 0.7).toFixed(2)}</dd>
    </dl>
  );
}