Skip to content

Commit

Permalink
FullWidth parameter #3
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Apr 21, 2021
1 parent ab553e8 commit 368f348
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 3 additions & 7 deletions Public/New-AdaptiveCard.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
[string] $SelectActionId,
[string] $SelectActionUrl,
[string] $SelectActionTitle,
[ValidateSet('Full', 'Small')][string] $Width = 'Full',
[switch] $FullWidth,
[switch] $AllowImageExpand
)
$Wrapper = [ordered]@{
Expand Down Expand Up @@ -132,12 +132,8 @@
if ($AllowImageExpand) {
$Wrapper['attachments'][0]['content']['msteams']['allowExpand'] = $true
}
if ($Width) {
if ($Width -eq 'Small') {
$Wrapper['attachments'][0]['content']['msteams']['width'] = 'Default'
} else {
$Wrapper['attachments'][0]['content']['msteams']['width'] = 'Full'
}
if ($FullWidth) {
$Wrapper['attachments'][0]['content']['msteams']['width'] = 'Full'
}
if ($MinimumHeight) {
$Wrapper['attachments'][0]['content']['minHeight'] = "$($MinimumHeight)px"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ Dependencies: **PSSharedGoods**, **PSWriteColor** and **Connectimo** are only us
## Changelog

- 2.0.1 / 2021.04.21
- ☑ Adaptive Cards are now set to Full Width by default. You can set them back to small by using Width parameter
- ☑ Added `FullWidth` switch to `New-AdaptiveCard`. This allows for full width adaptive card.
- ☑ Added `AllowImageExpand` switch to `New-AdaptiveCard`. This allows for expanding on images
- 2.0.0 / 2020.11.03
- [x] Added support for [AdaptiveCard](https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#adaptive-card) using `New-AdaptiveCard`
- [x] Added `New-AdaptiveActionSet`
Expand Down

0 comments on commit 368f348

Please sign in to comment.