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 <Polygon /> to vx-shape #355

Merged
merged 2 commits into from
Sep 18, 2018
Merged

add <Polygon /> to vx-shape #355

merged 2 commits into from
Sep 18, 2018

Conversation

dagda1
Copy link

@dagda1 dagda1 commented Sep 13, 2018

🚀 Enhancements

I have added a new simple <Polygon /> component that takes sides and length props and does the rest. I have added it to vx-shape

// hexagon
<Polygon sides={6} size={25} {...additionalProps} />

📝 Documentation

I have added a demo to vx-demo and updated the vx-shape README

@hshoff
Copy link
Member

hshoff commented Sep 15, 2018

Thanks for the PR! Don’t want to leave you in suspense, I’m just traveling and away from computer until Monday. Will take a look then.

@dagda1
Copy link
Author

dagda1 commented Sep 18, 2018

Hi @hshoff any thoughts on this?

| Name | Default | Type | Description |
| :-------------- | :----------------------- | :------- | :--------------------------------------------------------------------------------------------- |
| sides | | number | The number of sides in the polygon. |
| size | 25 | number | The length of eacch side of the polygon. |
Copy link
Member

Choose a reason for hiding this comment

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

eacch => each

Copy link
Author

Choose a reason for hiding this comment

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

fixed

points={points}
className={className}
fill={fill}
onClick={clickHandler}
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the clickHandler prop. In vx land you would just pass onClick and it would pass through in {...restProps}

Copy link
Author

Choose a reason for hiding this comment

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

removed clickHandler

Copy link
Member

@hshoff hshoff left a comment

Choose a reason for hiding this comment

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

would be happy to merge this once clickHandler is removed

@hshoff hshoff added this to the v0.0.175 milestone Sep 18, 2018
Copy link
Member

@hshoff hshoff left a comment

Choose a reason for hiding this comment

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

LGTM thank you for the contribution!

@hshoff hshoff merged commit e6e7e20 into airbnb:master Sep 18, 2018
@dagda1 dagda1 deleted the polygon branch September 18, 2018 20:29
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