-
-
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
[Slide] Wrong direction TypeScript definition #20084
Comments
Please provide a full reproduction test case. This would help a lot 👷 . |
Looking at the source, it seems about right Do you want to take care of the problem? :) |
@wmitsuda I believe the fix would look like this: diff --git a/packages/material-ui/src/Slide/Slide.d.ts b/packages/material-ui/src/Slide/Slide.d.ts
index 77efeeb8d..6132d95e1 100644
--- a/packages/material-ui/src/Slide/Slide.d.ts
+++ b/packages/material-ui/src/Slide/Slide.d.ts
@@ -3,7 +3,7 @@ import { Theme } from '../styles/createMuiTheme';
import { TransitionProps } from '../transitions/transition';
export interface SlideProps extends TransitionProps {
- direction: 'left' | 'right' | 'up' | 'down';
+ direction?: 'left' | 'right' | 'up' | 'down';
ref?: React.Ref<unknown>;
theme?: Theme;
} |
@oliviertassinari were you able to reproduce this problem? I'm willing to take care of that, but I have not been able to reproduce it. |
I haven't tried to reproduce it. I have only looked at the source that looked wrong. |
🤔 @wmitsuda could you provide more details? |
@belgamo if you go to this slide example at Material-UI doc and remove What @oliviertassinari said solves the problem.
|
I can create a PR for this issue. I'm looking to get more involved in the open source community, and love |
PR for the issue: |
Please see: https://material-ui.com/api/slide/
The docs say the direction prop has a default value of "down", but if you omit it from real code, the type information will complain saying you didn't specify the direction prop.
Either the doc or the type info is wrong.
Your Environment 🌎
The text was updated successfully, but these errors were encountered: