Pledge
Template for action cards that requires a user to take a pledge
Usage#
The templates takes care of the "Jeg <NAME>" text. You only need to specify the text that comes afterwards e.g. "promise to ..."
<ActionCardPledgeTemplate description="lover at ...." primaryButtonProps={{onPress: () => console.log("'Tag Løftet' pressed")}} secondaryButtonProps={{onPress: () => console.log("'Ellers Tak' pressed")}}/>With Background#
import svg from "..."
<ActionCardPledgeTemplate description="lover at ...." primaryButtonProps={{onPress: () => console.log("'Tag Løftet' pressed")}} secondaryButtonProps={{onPress: () => console.log("'Ellers Tak' pressed")}} backgroundImage={svg} backgroundOptions={{offsetX: -50}}/>Props#
| Name | Type | Default | Description |
|---|---|---|---|
description* | string | undefined | The description after the name on the pledge text |
primaryButtonProps | ActionCardButtonProps | undefined | The props for the "Tag Løftet" ("Take the pledge") button. See props here |
secondaryButtonProps | ActionCardButtonProps | undefined | The props for the "Ellers Tak" ("No Thanks") button. See props here |
backgroundImage | SVG | undefined | Background Image in SVG format |
backgroundOptions | {offsetX: number, offsetY: number, opacity: numbers} | undefined | Options for the background image. Currently only offset and opacity. |
*required