Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ExpansionPanelSummary] Add IconButtonProps property #12035

Merged
merged 4 commits into from
Jul 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import * as React from 'react';
import { StandardProps } from '..';
import { ButtonBaseProps } from '../ButtonBase';
import { IconButtonProps } from '../IconButton';

export interface ExpansionPanelSummaryProps
extends StandardProps<ButtonBaseProps, ExpansionPanelSummaryClassKey> {
disabled?: boolean;
expanded?: boolean;
expandIcon?: React.ReactNode;
IconButtonProps?: Partial<IconButtonProps>;
onChange?: React.ReactEventHandler<{}>;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class ExpansionPanelSummary extends React.Component {
disabled,
expanded,
expandIcon,
IconButtonProps,
onChange,
...other
} = this.props;
Expand Down Expand Up @@ -137,6 +138,7 @@ class ExpansionPanelSummary extends React.Component {
component="div"
tabIndex={-1}
aria-hidden="true"
{...IconButtonProps}
>
{expandIcon}
</IconButton>
Expand Down Expand Up @@ -174,6 +176,10 @@ ExpansionPanelSummary.propTypes = {
* The icon to display as the expand indicator.
*/
expandIcon: PropTypes.node,
/**
* Properties applied to the `TouchRipple` element wrapping the expand icon.
*/
IconButtonProps: PropTypes.object,
/**
* @ignore
*/
Expand Down
1 change: 1 addition & 0 deletions pages/api/expansion-panel-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ title: ExpansionPanelSummary API
| <span class="prop-name">children</span> | <span class="prop-type">node |   | The content of the expansion panel summary. |
| <span class="prop-name">classes</span> | <span class="prop-type">object |   | Override or extend the styles applied to the component. See [CSS API](#css-api) below for more details. |
| <span class="prop-name">expandIcon</span> | <span class="prop-type">node |   | The icon to display as the expand indicator. |
| <span class="prop-name">IconButtonProps</span> | <span class="prop-type">object |   | Properties applied to the `TouchRipple` element wrapping the expand icon. |

Any other properties supplied will be spread to the root element ([ButtonBase](/api/button-base)).

Expand Down