Skip to main content

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#

NameTypeDefaultDescription
description*stringundefinedThe description after the name on the pledge text
primaryButtonPropsActionCardButtonPropsundefinedThe props for the "Tag Løftet" ("Take the pledge") button. See props here
secondaryButtonPropsActionCardButtonPropsundefinedThe props for the "Ellers Tak" ("No Thanks") button. See props here
backgroundImageSVGundefinedBackground Image in SVG format
backgroundOptions{offsetX: number, offsetY: number, opacity: numbers}undefinedOptions for the background image. Currently only offset and opacity.

*required