Skip to content

Commit

Permalink
Added WidgetSize quadruple option
Browse files Browse the repository at this point in the history
  • Loading branch information
GuidoZam committed Jul 3, 2024
1 parent 511dd5e commit e43d2d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/controls/dashboard/widget/IWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export enum WidgetSize {
Single = "single",
Double = "double",
Triple = "triple",
Quadruple = "quadruple",
Box = "box",
}

Expand Down
5 changes: 4 additions & 1 deletion src/controls/dashboard/widget/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Widget = ({
gridColumnEnd: "auto",
gridRowEnd: "auto",
"@media (max-width: 842px)": {
gridColumnEnd: "span 3",
gridColumnEnd: "span 4",
},
};
if (widget.size === WidgetSize.Double) {
Expand All @@ -28,6 +28,9 @@ export const Widget = ({
if (widget.size === WidgetSize.Triple) {
cardStyle.gridColumnEnd = "span 3";
}
if (widget.size === WidgetSize.Quadruple) {
cardStyle.gridColumnEnd = "span 4";
}
if(widget.controlOptions && widget.controlOptions.isHidden){
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/webparts/controlsTest/components/ControlsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
title: "Card 1",
desc: "Last updated Monday, April 4 at 11:15 AM (PT)",
widgetActionGroup: calloutItemsExample,
size: WidgetSize.Triple,
size: WidgetSize.Quadruple,
body: [
{
id: "t1",
Expand Down

0 comments on commit e43d2d6

Please sign in to comment.