Skip to content

Commit

Permalink
rename method name and type
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Sep 6, 2023
1 parent 69b97f6 commit 9f3dd29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/mui-material/src/ButtonGroup/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const ButtonGroup = React.forwardRef(function ButtonGroup(inProps, ref) {
],
);

const addButtonGroupButtonContextPositionClassName = (index, childrenParam) => {
const getButtonPositionClassName = (index, childrenParam) => {
const isFirstButton = index === 0;
const isLastButton = index === React.Children.count(childrenParam) - 1;

Expand Down Expand Up @@ -289,7 +289,7 @@ const ButtonGroup = React.forwardRef(function ButtonGroup(inProps, ref) {

return (
<ButtonGroupButtonContext.Provider
value={addButtonGroupButtonContextPositionClassName(index, children)}
value={getButtonPositionClassName(index, children)}
>
{child}
</ButtonGroupButtonContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as React from 'react';

type ButtonGroupButtonContextClassNameValue = string;
type ButtonPositionClassName = string;

/**
* @ignore - internal component.
*/
const ButtonGroupButtonContext = React.createContext<
ButtonGroupButtonContextClassNameValue | undefined
>(undefined);
const ButtonGroupButtonContext = React.createContext<ButtonPositionClassName | undefined>(
undefined,
);

if (process.env.NODE_ENV !== 'production') {
ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';
Expand Down

0 comments on commit 9f3dd29

Please sign in to comment.