Skip to content

Commit 4e47cc8

Browse files
committed
Cleanup
* removed commented out cruft * added tabIndex prop to delete button (with default=0) * the last change also required a change to the sprite selector test snapshot
1 parent 415ecee commit 4e47cc8

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/components/delete-button/delete-button.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717

1818
}
1919

20-
/* .delete-button.large:hover {
21-
transform: scale(1.1, 1.1);
22-
box-shadow: 0 0 0 4px $ui-black-transparent;
23-
} */
24-
2520
.delete-button-visible {
2621
display: flex;
2722
align-items: center;

src/components/delete-button/delete-button.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const DeleteButton = props => (
1313
props.className
1414
)}
1515
role="button"
16-
tabIndex="0"
16+
tabIndex={props.tabIndex}
1717
onClick={props.onClick}
1818
>
1919
<div className={styles.deleteButtonVisible}>
@@ -28,7 +28,12 @@ const DeleteButton = props => (
2828

2929
DeleteButton.propTypes = {
3030
className: PropTypes.string,
31-
onClick: PropTypes.func.isRequired
31+
onClick: PropTypes.func.isRequired,
32+
tabIndex: PropTypes.number
33+
};
34+
35+
DeleteButton.defaultProps = {
36+
tabIndex: 0
3237
};
3338

3439
export default DeleteButton;

test/unit/components/__snapshots__/sprite-selector-item.test.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ exports[`SpriteSelectorItemComponent matches snapshot when given a number and de
5050
className=""
5151
onClick={[Function]}
5252
role="button"
53-
tabIndex="0"
53+
tabIndex={0}
5454
>
5555
<div
5656
className={undefined}
@@ -134,7 +134,7 @@ exports[`SpriteSelectorItemComponent matches snapshot when selected 1`] = `
134134
className=""
135135
onClick={[Function]}
136136
role="button"
137-
tabIndex="0"
137+
tabIndex={0}
138138
>
139139
<div
140140
className={undefined}

0 commit comments

Comments
 (0)