File tree 3 files changed +35
-1
lines changed
3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { Story } from "@storybook/react"
2
2
import {
3
3
MockWorkspace ,
4
4
MockWorkspaceAgent ,
5
+ MockWorkspaceApp ,
5
6
MockWorkspaceResource ,
6
7
} from "testHelpers/entities"
7
8
import { ResourceCard , ResourceCardProps } from "./ResourceCard"
@@ -35,6 +36,29 @@ HideSSHButton.args = {
35
36
hideSSHButton : true ,
36
37
}
37
38
39
+ export const BunchOfApps = Template . bind ( { } )
40
+ BunchOfApps . args = {
41
+ ...Example . args ,
42
+ resource : {
43
+ ...MockWorkspaceResource ,
44
+ agents : [
45
+ {
46
+ ...MockWorkspaceAgent ,
47
+ apps : [
48
+ MockWorkspaceApp ,
49
+ MockWorkspaceApp ,
50
+ MockWorkspaceApp ,
51
+ MockWorkspaceApp ,
52
+ MockWorkspaceApp ,
53
+ MockWorkspaceApp ,
54
+ MockWorkspaceApp ,
55
+ MockWorkspaceApp ,
56
+ ] ,
57
+ } ,
58
+ ] ,
59
+ } ,
60
+ }
61
+
38
62
export const BunchOfMetadata = Template . bind ( { } )
39
63
BunchOfMetadata . args = {
40
64
...Example . args ,
Original file line number Diff line number Diff line change @@ -149,7 +149,13 @@ export const ResourceCard: FC<ResourceCardProps> = ({
149
149
</ div >
150
150
</ Stack >
151
151
152
- < Stack direction = "row" alignItems = "center" spacing = { 0.5 } >
152
+ < Stack
153
+ direction = "row"
154
+ alignItems = "center"
155
+ spacing = { 0.5 }
156
+ wrap = "wrap"
157
+ maxWidth = "750px"
158
+ >
153
159
{ showApps && agent . status === "connected" && (
154
160
< >
155
161
{ applicationsHost !== undefined && (
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export type StackProps = {
12
12
spacing ?: number
13
13
alignItems ?: CSSProperties [ "alignItems" ]
14
14
justifyContent ?: CSSProperties [ "justifyContent" ]
15
+ maxWidth ?: CSSProperties [ "maxWidth" ]
15
16
wrap ?: CSSProperties [ "flexWrap" ]
16
17
} & React . HTMLProps < HTMLDivElement >
17
18
@@ -25,6 +26,7 @@ const useStyles = makeStyles((theme) => ({
25
26
alignItems : ( { alignItems } : StyleProps ) => alignItems ,
26
27
justifyContent : ( { justifyContent } : StyleProps ) => justifyContent ,
27
28
flexWrap : ( { wrap } : StyleProps ) => wrap ,
29
+ maxWidth : ( { maxWidth } : StyleProps ) => maxWidth ,
28
30
29
31
[ theme . breakpoints . down ( "sm" ) ] : {
30
32
width : "100%" ,
@@ -39,6 +41,7 @@ export const Stack: FC<StackProps & { children: ReactNode | ReactNode[] }> = ({
39
41
spacing = 2 ,
40
42
alignItems,
41
43
justifyContent,
44
+ maxWidth,
42
45
wrap,
43
46
...divProps
44
47
} ) => {
@@ -48,6 +51,7 @@ export const Stack: FC<StackProps & { children: ReactNode | ReactNode[] }> = ({
48
51
alignItems,
49
52
justifyContent,
50
53
wrap,
54
+ maxWidth,
51
55
} )
52
56
53
57
return (
You can’t perform that action at this time.
0 commit comments