Skip to content

Commit

Permalink
merge comments without tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Whorlow committed Jan 23, 2024
1 parent 55e7d9e commit e0d3417
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 30 deletions.
26 changes: 17 additions & 9 deletions docs/pages/material-ui/api/backdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
},
"invisible": { "type": { "name": "bool" }, "default": "false" },
"slotProps": {
"type": { "name": "shape", "description": "{ root?: object }" },
"type": {
"name": "shape",
"description": "{ root?: object, transition?: func<br>&#124;&nbsp;object }"
},
"default": "{}"
},
"slots": {
Expand All @@ -31,7 +34,12 @@
},
"additionalInfo": { "sx": true }
},
"TransitionComponent": { "type": { "name": "elementType" }, "default": "Fade" },
"TransitionComponent": {
"type": { "name": "elementType" },
"default": "Fade",
"deprecated": true,
"deprecationInfo": "Use <code>slots.transition</code> instead. This prop will be removed in v7."
},
"transitionDuration": {
"type": {
"name": "union",
Expand All @@ -45,10 +53,16 @@
"import { Backdrop } from '@mui/material';"
],
"slots": [
{
"name": "root",
"description": "The component that renders the root.",
"default": "'div'",
"class": "MuiBackdrop-root"
},
{
"name": "transition",
"description": "The component that renders the transition.\n[Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.",
"default": "Collapse",
"default": "Fade",
"class": null
}
],
Expand All @@ -58,12 +72,6 @@
"className": "MuiBackdrop-invisible",
"description": "Styles applied to the root element if `invisible={true}`.",
"isGlobal": false
},
{
"key": "root",
"className": "MuiBackdrop-root",
"description": "Styles applied to the root element.",
"isGlobal": false
}
],
"spread": true,
Expand Down
8 changes: 3 additions & 5 deletions docs/translations/api-docs/backdrop/backdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"description": "If <code>true</code>, the backdrop is invisible. It can be used when rendering a popover or a custom select component."
},
"open": { "description": "If <code>true</code>, the component is shown." },
"slotProps": {
"description": "The extra props for the slot components. You can override the existing props or add new ones.<br>This prop is an alias for the <code>componentsProps</code> prop, which will be deprecated in the future."
},
"slotProps": { "description": "The props used for each slot inside." },
"slots": {
"description": "The components used for each slot inside.<br>This prop is an alias for the <code>components</code> prop, which will be deprecated in the future."
},
Expand All @@ -37,10 +35,10 @@
"description": "Styles applied to {{nodeName}} if {{conditions}}.",
"nodeName": "the root element",
"conditions": "<code>invisible={true}</code>"
},
"root": { "description": "Styles applied to the root element." }
}
},
"slotDescriptions": {
"root": "The component that renders the root.",
"transition": "The component that renders the transition.\n[Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component."
}
}
15 changes: 4 additions & 11 deletions packages/mui-material/src/Backdrop/Backdrop.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';

export interface BackdropSlots {
/**
* The component that renders the root.
* @default 'div'
*/
root?: React.ElementType;
/**
* The component that renders the transition.
Expand Down Expand Up @@ -76,17 +80,6 @@ export interface BackdropOwnProps extends Partial<Omit<FadeProps, 'children'>> {
* If `true`, the component is shown.
*/
open: boolean;
/**
* The extra props for the slot components.
* You can override the existing props or add new ones.
*
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
*
* @default {}
*/
slotProps?: {
root?: React.HTMLAttributes<HTMLDivElement> & BackdropComponentsPropsOverrides;
};
/**
* The components used for each slot inside.
*
Expand Down
6 changes: 1 addition & 5 deletions packages/mui-material/src/Backdrop/Backdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ Backdrop.propTypes /* remove-proptypes */ = {
*/
open: PropTypes.bool.isRequired,
/**
* The extra props for the slot components.
* You can override the existing props or add new ones.
*
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
*
* The props used for each slot inside.
* @default {}
*/
slotProps: PropTypes.shape({
Expand Down

0 comments on commit e0d3417

Please sign in to comment.