File tree 3 files changed +18
-0
lines changed
apps/copilots/src/pages/copilot-opportunity-list
libs/ui/lib/components/content-layout
3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -134,10 +134,16 @@ const CopilotOpportunityList: FC<{}> = () => {
134
134
onClick : ( ) => navigate ( copilotRoutesMap . CopilotRequestForm ) ,
135
135
}
136
136
137
+ const addCopilotRequestsButton : ButtonProps = {
138
+ label : 'Copilot Requests' ,
139
+ onClick : ( ) => navigate ( copilotRoutesMap . CopilotRequests ) ,
140
+ }
141
+
137
142
return (
138
143
< ContentLayout
139
144
title = 'Copilot Opportunities'
140
145
buttonConfig = { isAdminOrPM ? addNewRequestButton : undefined }
146
+ secondaryButtonConfig = { isAdminOrPM ? addCopilotRequestsButton : undefined }
141
147
>
142
148
< PageTitle > Copilot Opportunities</ PageTitle >
143
149
< Table
Original file line number Diff line number Diff line change 29
29
border-bottom : $border solid $black-5 ;
30
30
margin-top : $sp-2 ;
31
31
padding : $sp-6 0 ;
32
+ gap : $sp-6 ;
32
33
33
34
h1 {
34
35
flex : 1 ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import styles from './ContentLayout.module.scss'
7
7
8
8
export interface ContentLayoutProps {
9
9
buttonConfig ?: ButtonProps
10
+ secondaryButtonConfig ?: ButtonProps
10
11
children ?: ReactNode
11
12
contentClass ?: string
12
13
innerClass ?: string
@@ -29,6 +30,16 @@ const ContentLayout: FC<ContentLayoutProps> = (props: ContentLayoutProps) => (
29
30
{ props . title }
30
31
</ h1 >
31
32
33
+ { ! ! props . secondaryButtonConfig && (
34
+ < div >
35
+ < Button
36
+ { ...props . secondaryButtonConfig }
37
+ secondary
38
+ size = 'lg'
39
+ />
40
+ </ div >
41
+ ) }
42
+
32
43
{ ! ! props . buttonConfig && (
33
44
< div >
34
45
< Button
You can’t perform that action at this time.
0 commit comments