Skip to content

Commit

Permalink
add retrigger to a button group
Browse files Browse the repository at this point in the history
  • Loading branch information
abe garcia committed Jun 28, 2023
1 parent 889d006 commit da202f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button } from '@material-ui/core';
import { Button, ButtonGroup } from '@material-ui/core';
import React, { useState } from 'react';

import type { IExecution } from '@spinnaker/core';
Expand Down Expand Up @@ -38,18 +38,17 @@ export const RetriggerButton = ({ disabled, executions, refreshExecutions }: IRe
};

return (
<Button
disabled={disabled}
onMouseEnter={handleHover}
onMouseLeave={handleHover}
onClick={handleRetrigger}
style={{
width: '7rem',
color: 'white',
backgroundColor: isHovered ? 'var(--button-primary-hover-bg)' : 'var(--color-accent)',
}}
>
Retrigger
</Button>
<ButtonGroup onMouseEnter={handleHover} onMouseLeave={handleHover} variant="contained" disabled={disabled}>
<Button
onClick={handleRetrigger}
style={{
width: '7rem',
color: 'white',
backgroundColor: isHovered ? 'var(--button-primary-hover-bg)' : 'var(--color-accent)',
}}
>
Retrigger
</Button>
</ButtonGroup>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ import type { ChangeEvent } from 'react';
import React, { useState } from 'react';

import type { IExecution } from '@spinnaker/core';
import { Executions } from '@spinnaker/core/dist/pipeline/executions/Executions';

import { ExecutionRow } from './ExecutionRow';
import { PaginationActions } from './PaginationActions';
import { TableHeaders } from './TableHeaders';
import { ActionButtonsContainer, PauseResumeButton, RetriggerButton } from '../actions';
import { DEFAULT_ROWS_PER_PAGE } from './constants';
import { retriggerExecutions } from '../../services/BroadsideService';

const useStyles = makeStyles({
tableContainer: { borderRadius: 'inherit' },
Expand Down

0 comments on commit da202f2

Please sign in to comment.