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

new(react-spring): add tickLineProps to AnimatedTicks #1490

Merged
merged 1 commit into from
May 2, 2022

Conversation

Zenith00
Copy link
Contributor

@Zenith00 Zenith00 commented May 1, 2022

🚀 Enhancements

  • Allows supplying of tickLineProps for tick lines in AnimatedTicks for parity with Ticks ( new(axis): enable customization of tickLineProps #1211 )
  • Adjusts LineProps to omit ref for react-spring with the slightly simplifying assumption that we aren't interested in supplying refs manually with regular Ticks either

@Zenith00 Zenith00 changed the title new(xychart, react-spring): add tickLineProps to AnimatedTicks new(react-spring): add tickLineProps to AnimatedTicks May 1, 2022
Copy link
Collaborator

@williaster williaster left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the contribution @Zenith00 🙏

will try to have this released later today (slight delay with react@18 support as mentioned on your other PR)

@@ -10,7 +10,7 @@ export type AxisScaleOutput = number | NumberLike | undefined;
export type AxisScale<Output extends AxisScaleOutput = AxisScaleOutput> =
// eslint-disable-next-line @typescript-eslint/no-explicit-any
D3Scale<Output, any, any>;
type LineProps = Omit<React.SVGProps<SVGLineElement>, 'to' | 'from'>;
type LineProps = Omit<React.SVGProps<SVGLineElement>, 'to' | 'from' | 'ref'>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -101,4 +101,21 @@ describe('<BaseAxis />', () => {
expect(VisxLine).toHaveAttribute('stroke-width', `${axisStyles.axisLine.strokeWidth}`);
expect(VisxLine).toHaveAttribute('stroke', axisStyles.tickLine.stroke);
});

it('should accept props for tickline', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you for adding tests! 🙏

@williaster williaster merged commit 029e0b2 into airbnb:master May 2, 2022
@github-actions
Copy link

github-actions bot commented May 3, 2022

🎉 This PR is included in version v2.10.0 of the packages modified 🎉

@Zenith00 Zenith00 deleted the animated-axis-ticklineprops branch May 3, 2022 01:09
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.

None yet

2 participants