forked from syndesisio/syndesis-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConnectionsListView.tsx
39 lines (37 loc) · 1.25 KB
/
ConnectionsListView.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import * as H from '@syndesis/history';
import * as React from 'react';
import { ButtonLink, PageSection } from '../Layout';
import { IListViewToolbarProps, ListViewToolbar } from '../Shared';
import { toTestId } from '../utils';
export interface IConnectionsListViewProps extends IListViewToolbarProps {
createConnectionButtonStyle?: 'primary' | 'default';
linkToConnectionCreate: H.LocationDescriptor;
i18nLinkCreateConnection: string;
}
export class ConnectionsListView extends React.Component<
IConnectionsListViewProps
> {
public render() {
return (
<>
<PageSection noPadding={true} variant={'light'}>
<ListViewToolbar {...this.props}>
<div className="form-group">
<ButtonLink
data-testid={`${toTestId(
'ConnectionsListView',
'create-connection-button'
)}`}
href={this.props.linkToConnectionCreate}
as={this.props.createConnectionButtonStyle || 'primary'}
>
{this.props.i18nLinkCreateConnection}
</ButtonLink>
</div>
</ListViewToolbar>
</PageSection>
<PageSection>{this.props.children}</PageSection>
</>
);
}
}