Skip to content

Commit 0724dad

Browse files
[IconButton] Better follow the spec (#9967)
1 parent 70078cc commit 0724dad

4 files changed

Lines changed: 4 additions & 9 deletions

File tree

pages/api/icon-button.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ This property accepts the following keys:
3434
- `disabled`
3535
- `label`
3636
- `icon`
37-
- `keyboardFocused`
3837

3938
Have a look at [overriding with classes](/customization/overrides#overriding-with-classes) section
4039
and the [implementation of the component](https://github.com/mui-org/material-ui/tree/v1-beta/src/IconButton/IconButton.js)

src/ButtonBase/TouchRipple.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const styles = theme => ({
3636
display: 'block',
3737
width: '100%',
3838
height: '100%',
39-
animation: `mui-ripple-pulsate 1500ms ${theme.transitions.easing.easeInOut} 200ms infinite`,
39+
animation: `mui-ripple-pulsate 2500ms ${theme.transitions.easing.easeInOut} 200ms infinite`,
4040
},
4141
'@keyframes mui-ripple-enter': {
4242
'0%': {
@@ -59,7 +59,7 @@ export const styles = theme => ({
5959
transform: 'scale(1)',
6060
},
6161
'50%': {
62-
transform: 'scale(0.9)',
62+
transform: 'scale(0.92)',
6363
},
6464
'100%': {
6565
transform: 'scale(1)',

src/IconButton/IconButton.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export type IconButtonClassKey =
1616
| 'colorSecondary'
1717
| 'colorInherit'
1818
| 'label'
19-
| 'icon'
20-
| 'keyboardFocused';
19+
| 'icon';
2120

2221
declare const IconButton: React.ComponentType<IconButtonProps>;
2322

src/IconButton/IconButton.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ export const styles = theme => ({
4646
width: '1em',
4747
height: '1em',
4848
},
49-
keyboardFocused: {
50-
backgroundColor: theme.palette.text.divider,
51-
},
5249
});
5350

5451
/**
@@ -69,7 +66,7 @@ function IconButton(props) {
6966
className,
7067
)}
7168
centerRipple
72-
keyboardFocusedClassName={classes.keyboardFocused}
69+
focusRipple
7370
disabled={disabled}
7471
rootRef={buttonRef}
7572
ref={rootRef}

0 commit comments

Comments
 (0)