CardImage class
Builder class to simplify adding images to a card.
Constructors
Card |
Creates a new CardImage. |
Methods
alt(Text |
Alternate text of the image to use for accessibility pourposes. |
create(Session, string) | Creates a new CardImage for a given url. |
tap(ICard |
Action to take when the image is tapped. |
to |
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
- action