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

Conversation

Projects
None yet
2 participants
@dagda1
Copy link

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

Paul Cowan
@hshoff

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link

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. |

This comment has been minimized.

@hshoff

hshoff Sep 18, 2018

Owner

eacch => each

This comment has been minimized.

@dagda1
points={points}
className={className}
fill={fill}
onClick={clickHandler}

This comment has been minimized.

@hshoff

hshoff Sep 18, 2018

Owner

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

This comment has been minimized.

@dagda1

dagda1 Sep 18, 2018

removed clickHandler

@hshoff
Copy link
Owner

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

@dagda1 dagda1 force-pushed the dagda1:polygon branch from eea9a5c to 954637d Sep 18, 2018

@hshoff

hshoff approved these changes Sep 18, 2018

Copy link
Owner

hshoff left a comment

LGTM thank you for the contribution!

@hshoff hshoff merged commit e6e7e20 into hshoff:master Sep 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dagda1 dagda1 deleted the dagda1:polygon branch Sep 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment