-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[system] <Box component={Paper} square> throws unasignable type #16843
Labels
bug 🐛
Something doesn't work
component: Box
The React component.
package: system
Specific to @mui/system
typescript
Comments
This comment has been minimized.
This comment has been minimized.
2 tasks
I confirm this issue sill exist. |
For tracking, the issue exists with primitive <Box
component="img"
src="https://tailwindcss.com/_next/static/media/erin-lindford.4804b52007ca82ebe9999d19c717b44d.jpg"
/> First reported in #23053 (comment) |
2 tasks
Temporary workaround (here with a import { FunctionComponent, FormHTMLAttributes } from 'react'
import { Box, BoxProps } from '@material-ui/core'
type FormBoxProps = BoxProps & FormHTMLAttributes<HTMLFormElement>
export const FormBox: FunctionComponent<FormBoxProps> = (props) => (
<Box {...props} component='form' />
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug 🐛
Something doesn't work
component: Box
The React component.
package: system
Specific to @mui/system
typescript
What it says on the tin - using typescript
Expected Behavior 🤔
Shouldn't complain when passing attributes component should accept
Current Behavior 😯
Does complain:
Steps to Reproduce 🕹
https://codesandbox.io/s/kind-haslett-38ykt
Context 🔦
I want to leverage the awesome attributes Box gives me whilst using other components, for example;
From the typescript guide:
Your Environment 🌎
The text was updated successfully, but these errors were encountered: