API reference
enhance/cigarette-card
Import
Section titled “Import”import * as api from "@fungi.computer/caps/enhance/cigarette-card";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| function | setCigaretteCardFlipped() | Show one face of a server-rendered CigaretteCard. |
| function | enhanceCigaretteCards() | Flip server-rendered CigaretteCards on click, tap, Enter or Space. The card is a native button, so the keyboard reaches it as a click; this only toggles the pressed state. Returns a cleanup that removes the listener. |
setCigaretteCardFlipped()function
Section titled “setCigaretteCardFlipped()”function setCigaretteCardFlipped(card, flipped): void;Show one face of a server-rendered CigaretteCard.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
card |
HTMLElement |
flipped |
boolean |
Returns
Section titled “Returns”void
enhanceCigaretteCards()function
Section titled “enhanceCigaretteCards()”function enhanceCigaretteCards(root?): () => void;Flip server-rendered CigaretteCards on click, tap, Enter or Space. The card is a native button, so the keyboard reaches it as a click; this only toggles the pressed state. Returns a cleanup that removes the listener.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
root |
Document | HTMLElement |
document |
Returns
Section titled “Returns”() => void