Skip to content
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

Add direction prop for EuiFlexGroup typing #1196

Merged
merged 4 commits into from
Sep 18, 2018

Conversation

justinkambic
Copy link
Contributor

Summary

Add support for the direction prop of the EuiFlexGroup component for TypeScript.

Checklist

  • This was checked in mobile
  • This was checked in IE11
  • This was checked in dark mode
  • Any props added have proper autodocs
  • Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • This was checked for breaking changes and labeled appropriately
  • Jest tests were updated or added to match the most common scenarios
  • This was checked against keyboard-only and screenreader scenarios

Note: any checks not completed were deemed unnecessary by me. Please let me know if any further check work needs to be done before this is ready to merge.

component?: FlexGroupCmponentType;
direction?: FlexGroupDirection;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you're in this file already, mind adding the other missing prop type definitions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing 👍

@@ -43,11 +48,12 @@ declare module '@elastic/eui' {
export type FlexGroupCmponentType = 'div' | 'span';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chandlerprall should we rename this type to FlexGroupComponentType? At first I thought it was an abbreviation but now I'm wondering if it wasn't meant to be that name all along?

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small type change

alignItems?: FlexGroupAlignItems;
children?: React.ReactNode;
className?: FlexGroupClassName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

className should be a string type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely.. I read over className and saw componentType was PropTypes.oneOf(['div', 'span'])

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@justinkambic justinkambic merged commit 48a8710 into elastic:master Sep 18, 2018
@justinkambic justinkambic deleted the euiflexgroup-direction-prop branch September 18, 2018 19:51
@snide snide mentioned this pull request Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants