forked from patternfly/react-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSerialConsoleActions.tsx
More file actions
36 lines (33 loc) · 1019 Bytes
/
SerialConsoleActions.tsx
File metadata and controls
36 lines (33 loc) · 1019 Bytes
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
import { Button } from '@patternfly/react-core';
import { createUseStyles } from 'react-jss';
const useStyles = createUseStyles({
consoleActionsSerial: {
gridArea: 'actions-extra',
display: 'flex',
justifyContent: 'flex-end',
'> button': {
marginRight: 'var(--pf-t-global--spacer--sm)'
}
}
});
export interface SerialConsoleActionsProps extends React.HTMLProps<HTMLDivElement> {
onDisconnect: () => void;
onReset: () => void;
textDisconnect?: string;
textReset?: string;
}
export const SerialConsoleActions: React.FunctionComponent<SerialConsoleActionsProps> = ({
textDisconnect = 'Disconnect',
textReset = 'Reset',
...props
}: SerialConsoleActionsProps) => (
<div className={useStyles().consoleActionsSerial}>
<Button variant="secondary" onClick={props.onDisconnect}>
{textDisconnect}
</Button>
<Button variant="secondary" onClick={props.onReset}>
{textReset}
</Button>
</div>
);
SerialConsoleActions.displayName = 'SerialConsoleActions';