fix: docs
This commit is contained in:
imccyu
2026-07-30 15:56:41 +08:00
parent 085383b145
commit 1e10966ef6
160 changed files with 2521 additions and 1135 deletions
@@ -8,9 +8,14 @@ import css from './ConnectionBanner.module.css'
/**
* Render the reconnecting banner.
* @param props.reconnecting - true while the connection is in backoff/retry.
* @param props.label - banner text; the owner passes localized copy (this
* package is cordis-free, so copy arrives via props).
* @returns the banner, or null when connected.
*/
export function ConnectionBanner({ reconnecting }: { reconnecting: boolean }) {
export function ConnectionBanner({ reconnecting, label = '连接已断开,正在重连…' }: {
reconnecting: boolean
label?: string | undefined
}) {
if (!reconnecting) return null
return <div className={css.banner}></div>
return <div className={css.banner}>{label}</div>
}