Skip to content

Commit

Permalink
Reapply "Partial changes for issue #656"
Browse files Browse the repository at this point in the history
This reverts commit cc20541.
  • Loading branch information
onehanddev committed Oct 13, 2024
1 parent cc20541 commit 55f8f07
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 16 deletions.
1 change: 0 additions & 1 deletion docs/data/api/menu-trigger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"props": {
"className": { "type": { "name": "union", "description": "func<br>&#124;&nbsp;string" } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"focusableWhenDisabled": { "type": { "name": "bool" }, "default": "false" },
"label": { "type": { "name": "string" } },
"render": { "type": { "name": "union", "description": "element<br>&#124;&nbsp;func" } }
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"description": "Class names applied to the element or a function that returns them based on the component&#39;s state."
},
"disabled": { "description": "If <code>true</code>, the component is disabled." },
"focusableWhenDisabled": {
"description": "If <code>true</code>, allows a disabled button to receive focus."
},
"label": { "description": "Label of the button" },
"render": { "description": "A function to customize rendering of the component." }
},
Expand Down
1 change: 1 addition & 0 deletions packages/mui-base/src/Checkbox/Root/CheckboxRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const CheckboxRoot = React.forwardRef(function CheckboxRoot(
extraProps: {
...otherProps,
...otherGroupProps,
disabled
},
});

Expand Down
10 changes: 0 additions & 10 deletions packages/mui-base/src/Menu/Trigger/MenuTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ namespace MenuTrigger {
* @default false
*/
disabled?: boolean;
/**
* If `true`, allows a disabled button to receive focus.
* @default false
*/
focusableWhenDisabled?: boolean;
/**
* Label of the button
*/
Expand Down Expand Up @@ -103,11 +98,6 @@ MenuTrigger.propTypes /* remove-proptypes */ = {
* @default false
*/
disabled: PropTypes.bool,
/**
* If `true`, allows a disabled button to receive focus.
* @default false
*/
focusableWhenDisabled: PropTypes.bool,
/**
* Label of the button
*/
Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/Menu/Trigger/useMenuTrigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export function useMenuTrigger(parameters: useMenuTrigger.Parameters): useMenuTr

const { getButtonProps, buttonRef } = useButton({
disabled,
focusableWhenDisabled: false,
buttonRef: mergedRef,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Switch/Root/SwitchRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const SwitchRoot = React.forwardRef(function SwitchRoot(
className,
propGetter: getButtonProps,
ownerState,
extraProps: other,
extraProps: {...other, disabled},
customStyleHookMapping: styleHookMapping,
ref: forwardedRef,
});
Expand Down

0 comments on commit 55f8f07

Please sign in to comment.