ProviderIcon
The provider’s icon, with two deliberate degrades:
- no
iconUrl→ a monogram from the provider’s name; - the image 404s / fails to load → the SAME monogram, swapped in on
the
errorevent.
A broken-image glyph inside a sign-in button is worse than no icon at all, and neither is worth losing the button over.
The image is DECORATIVE (alt=""): the name sits next to it, and in
icon-only mode the button carries an aria-label. Announcing the
logo too would just repeat it.
Usage
import { ProviderIcon } from '@rw3iss/auth-client/preact/atoms';
<ProviderIcon />Props
| Name | Type | Description |
|---|---|---|
provider | ProviderIdentity | null | Skip resolution and render this identity. |
client | AuthClient | |
size | number | Box size in px (both dimensions). Default 20. |
radius | number | Corner radius in px. Default 4. Pass 999 for a circle. |
className | string |