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鈥檒l 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 hshoff commented Sep 15, 2018

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

@dagda1
Copy link
Author

@dagda1 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

@hshoff hshoff Sep 18, 2018

eacch => each

Copy link
Author

@dagda1 dagda1 Sep 18, 2018

fixed

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

@hshoff hshoff Sep 18, 2018

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

Copy link
Author

@dagda1 dagda1 Sep 18, 2018

removed clickHandler

Copy link
Member

@hshoff hshoff left a comment

would be happy to merge this once clickHandler is removed

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

@hshoff hshoff left a comment

LGTM thank you for the contribution!

@hshoff hshoff merged commit e6e7e20 into airbnb:master Sep 18, 2018
1 check passed
@dagda1 dagda1 deleted the polygon branch Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants