moderator-toolbox-nxg-for-reddit / modules/betterbuttons/features/stickyButtons
modules/betterbuttons/features/stickyButtons¶
Functions¶
createStickyButtonHandlers()¶
createStickyButtonHandlers():
object
Defined in: extension/data/modules/betterbuttons/features/stickyButtons.tsx:135
Creates handlers for the sticky-button feature.
Returns¶
An object containing register, which contributes sticky buttons to thing flat-list slots.
Call lifecycle.mount(register()) in index.ts to wire cleanup.
register¶
register: () => () =>
void
Registers sticky buttons at the thingFlatListActions slot and returns a cleanup function.
Returns¶
() => void
StickyButton()¶
StickyButton(
__namedParameters):Element
Defined in: extension/data/modules/betterbuttons/features/stickyButtons.tsx:63
Renders sticky/unsticky action links for a post listing item.
A stickied post shows an unsticky link. An unstickied post shows a sticky slot 1 link,
plus a sticky slot 2 link when the subreddit already has a sticky (Reddit rejects slot 2
otherwise). Stickying into an occupied slot replaces whatever currently holds it.
Parameters¶
__namedParameters¶
StickyButtonProps
Returns¶
Element