Skip to content

Commit

Permalink
Restore default annotations in Popper docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Dec 21, 2022
1 parent 6e8afa7 commit 6061ec4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
22 changes: 16 additions & 6 deletions docs/pages/material-ui/api/popper.json
Expand Up @@ -8,9 +8,13 @@
}
},
"children": { "type": { "name": "union", "description": "node<br>&#124;&nbsp;func" } },
"components": { "type": { "name": "shape", "description": "{ Root?: elementType }" } },
"components": {
"type": { "name": "shape", "description": "{ Root?: elementType }" },
"default": "{}"
},
"componentsProps": {
"type": { "name": "shape", "description": "{ root?: func<br>&#124;&nbsp;object }" }
"type": { "name": "shape", "description": "{ root?: func<br>&#124;&nbsp;object }" },
"default": "{}"
},
"container": { "type": { "name": "union", "description": "HTML element<br>&#124;&nbsp;func" } },
"disablePortal": { "type": { "name": "bool" } },
Expand All @@ -25,19 +29,25 @@
"type": {
"name": "enum",
"description": "'auto-end'<br>&#124;&nbsp;'auto-start'<br>&#124;&nbsp;'auto'<br>&#124;&nbsp;'bottom-end'<br>&#124;&nbsp;'bottom-start'<br>&#124;&nbsp;'bottom'<br>&#124;&nbsp;'left-end'<br>&#124;&nbsp;'left-start'<br>&#124;&nbsp;'left'<br>&#124;&nbsp;'right-end'<br>&#124;&nbsp;'right-start'<br>&#124;&nbsp;'right'<br>&#124;&nbsp;'top-end'<br>&#124;&nbsp;'top-start'<br>&#124;&nbsp;'top'"
}
},
"default": "'bottom'"
},
"popperOptions": {
"type": {
"name": "shape",
"description": "{ modifiers?: array, onFirstUpdate?: func, placement?: 'auto-end'<br>&#124;&nbsp;'auto-start'<br>&#124;&nbsp;'auto'<br>&#124;&nbsp;'bottom-end'<br>&#124;&nbsp;'bottom-start'<br>&#124;&nbsp;'bottom'<br>&#124;&nbsp;'left-end'<br>&#124;&nbsp;'left-start'<br>&#124;&nbsp;'left'<br>&#124;&nbsp;'right-end'<br>&#124;&nbsp;'right-start'<br>&#124;&nbsp;'right'<br>&#124;&nbsp;'top-end'<br>&#124;&nbsp;'top-start'<br>&#124;&nbsp;'top', strategy?: 'absolute'<br>&#124;&nbsp;'fixed' }"
}
},
"default": "{}"
},
"popperRef": { "type": { "name": "custom", "description": "ref" } },
"slotProps": {
"type": { "name": "shape", "description": "{ root?: func<br>&#124;&nbsp;object }" }
"type": { "name": "shape", "description": "{ root?: func<br>&#124;&nbsp;object }" },
"default": "{}"
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
},
"slots": { "type": { "name": "shape", "description": "{ root?: elementType }" } },
"sx": {
"type": {
"name": "union",
Expand Down
4 changes: 3 additions & 1 deletion packages/mui-material/src/Popper/Popper.tsx
Expand Up @@ -49,11 +49,13 @@ const Popper = React.forwardRef(function Popper(
ref: React.ForwardedRef<HTMLDivElement>,
) {
const theme = useTheme<{ direction?: Direction }>();
const { components, componentsProps, slots, slotProps, ...other } = useThemeProps({
const props = useThemeProps({
props: inProps,
name: 'MuiPopper',
});

const { components, componentsProps, slots, slotProps, ...other } = props;

const RootComponent = slots?.root ?? components?.Root;

return (
Expand Down

0 comments on commit 6061ec4

Please sign in to comment.