Skip to content

Commit d450bfd

Browse files
committed
distinguish buttons and checkbox style
1 parent e389cd2 commit d450bfd

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

packages/compass-components/src/components/select-table.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import {
99
TableBody,
1010
TableHead,
1111
} from './leafygreen';
12+
import { spacing } from '@leafygreen-ui/tokens';
13+
import { css } from '@leafygreen-ui/emotion';
14+
15+
const checkboxStyles = css({
16+
padding: spacing[100],
17+
});
1218

1319
type SelectItem = {
1420
id: string;
@@ -61,6 +67,7 @@ export function SelectTable<T extends SelectItem>(
6167
<HeaderRow>
6268
<HeaderCell key="select-table-all-checkbox">
6369
<Checkbox
70+
className={checkboxStyles}
6471
data-testid="select-table-all-checkbox"
6572
aria-label="Select all"
6673
onChange={handleSelectAllChange}
@@ -79,6 +86,7 @@ export function SelectTable<T extends SelectItem>(
7986
<Row key={item.id}>
8087
<Cell>
8188
<Checkbox
89+
className={checkboxStyles}
8290
key={`select-${item.id}`}
8391
name={`select-${item.id}`}
8492
data-testid={`select-${item.id}`}

packages/compass-data-modeling/src/components/new-diagram-form.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const FormStepContainer: React.FunctionComponent<{
4141
isNextDisabled: boolean;
4242
nextLabel: string;
4343
previousLabel: string;
44+
step: string;
4445
}> = ({
4546
title,
4647
description,
@@ -51,6 +52,7 @@ const FormStepContainer: React.FunctionComponent<{
5152
nextLabel,
5253
previousLabel,
5354
children,
55+
step,
5456
}) => {
5557
return (
5658
<>
@@ -71,10 +73,13 @@ const FormStepContainer: React.FunctionComponent<{
7173
disabled={isNextDisabled}
7274
isLoading={isLoading}
7375
variant="primary"
76+
key={`${step}-next`}
7477
>
7578
{nextLabel}
7679
</Button>
77-
<Button onClick={onPreviousClick}>{previousLabel}</Button>
80+
<Button onClick={onPreviousClick} key={`${step}-previous`}>
81+
{previousLabel}
82+
</Button>
7883
</ModalFooter>
7984
</>
8085
);
@@ -318,6 +323,7 @@ const NewDiagramForm: React.FunctionComponent<NewDiagramFormProps> = ({
318323
previousLabel={cancelLabel}
319324
isNextDisabled={isConfirmDisabled}
320325
isLoading={isLoading}
326+
step={currentStep}
321327
>
322328
{formContent}
323329
</FormStepContainer>

0 commit comments

Comments
 (0)