Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvuGvHpbAQ4syfuLuRvutL
27 lines
1,008 B
TypeScript
27 lines
1,008 B
TypeScript
import { Icon } from "../Icon";
|
|
|
|
/** Nummerierte Schritte einer geführten Einrichtung. */
|
|
export function Steps({ children }: { children: React.ReactNode }) {
|
|
return <ol className="ad-steps">{children}</ol>;
|
|
}
|
|
|
|
export function Step({ n, title, done, children }: { n: number; title: string; done?: boolean; children: React.ReactNode }) {
|
|
return (
|
|
<li className={`ad-step${done ? " is-done" : ""}`}>
|
|
<span className="ad-step__num" aria-hidden="true">{done ? <Icon name="check" size="sm" /> : n}</span>
|
|
<div className="ad-step__body">
|
|
<h3>{title}{done && <span className="sr-only"> (erledigt)</span>}</h3>
|
|
{children}
|
|
</div>
|
|
</li>
|
|
);
|
|
}
|
|
|
|
/** Link zur passenden Seite beim Anbieter, öffnet in neuem Tab. */
|
|
export function OpenLink({ href, children }: { href: string; children: React.ReactNode }) {
|
|
return (
|
|
<a className="ad-openlink" href={href} target="_blank" rel="noopener noreferrer">
|
|
{children} <Icon name="external" size="sm" />
|
|
</a>
|
|
);
|
|
}
|