CardImage class

Builder class to simplify adding images to a card.

Constructors

CardImage(Session)

Creates a new CardImage.

Methods

alt(TextType, any[])

Alternate text of the image to use for accessibility pourposes.

create(Session, string)

Creates a new CardImage for a given url.

tap(ICardAction | IIsCardAction)

Action to take when the image is tapped.

toImage()

Returns the JSON for the image.

url(string)

URL of the image to display.

Constructor Details

CardImage(Session)

Creates a new CardImage.

new CardImage(session?: Session)

Parameters

session
Session

(Optional) will be used to localize any text.

Method Details

alt(TextType, any[])

Alternate text of the image to use for accessibility pourposes.

function alt(text: TextType, args: any[])

Parameters

text
TextType
args

any[]

Returns

create(Session, string)

Creates a new CardImage for a given url.

static function create(session: Session, url: string)

Parameters

session
Session
url

string

Returns

tap(ICardAction | IIsCardAction)

Action to take when the image is tapped.

function tap(action: ICardAction | IIsCardAction)

Parameters

Returns

toImage()

Returns the JSON for the image.

function toImage()

Returns

url(string)

URL of the image to display.

function url(u: string)

Parameters

u

string

Returns