Skip to content

feat(svg): add a gradientRatio prop#140

Merged
danilowoz merged 4 commits into
danilowoz:masterfrom
alexkirsz:feat-gradient-ratio
Mar 6, 2019
Merged

feat(svg): add a gradientRatio prop#140
danilowoz merged 4 commits into
danilowoz:masterfrom
alexkirsz:feat-gradient-ratio

Conversation

@alexkirsz

Copy link
Copy Markdown
Contributor

Depends on #139, so you can ignore the first commit.

Summary

Add a gradientRatio prop that controls the width of the gradient relative to the viewbox's own
width. For instance, a gradientRatio of 0.5 and a width of 200 imply that the resulting gradient
will have a width of 100px.

Any Breaking Changes

None, there already was an implicit gradient ratio of 2 which I've set as the default.

Checklist

  • Are all the test cases passing?
  • If any new feature has been added, then are the test cases updated/added?
  • Has the documentation been updated for the proposed change, if required?

Alexandre Kirszenberg added 2 commits March 3, 2019 20:02
Add an interval prop that controls the duration of the interval between two animations. For
instance, an interval of `.25` and an animation speed of `2` imply that the animation will
take 1.5s to complete, and wait 0.5s before starting again.
Add a gradientRatio prop that controls the width of the gradient relative to the viewbox's own
width. For instance, a gradientRatio of `0.5` and a width of `200` imply that the resulting gradient
will have a width of 100px.
@alexkirsz alexkirsz mentioned this pull request Mar 3, 2019
3 tasks
@codecov

codecov Bot commented Mar 3, 2019

Copy link
Copy Markdown

Codecov Report

Merging #140 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
+ Coverage   96.92%   96.96%   +0.04%     
==========================================
  Files           9        9              
  Lines          65       66       +1     
  Branches        9        9              
==========================================
+ Hits           63       64       +1     
  Partials        2        2
Impacted Files Coverage Δ
src/Holder.tsx 100% <ø> (ø) ⬆️
src/Svg.tsx 93.75% <100%> (+0.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f26e2d...8c017e1. Read the comment docs.

@danilowoz danilowoz force-pushed the feat-gradient-ratio branch from e26de0c to 8c017e1 Compare March 6, 2019 21:31

@danilowoz danilowoz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice, pretty useful!

@danilowoz danilowoz merged commit b8e5cb9 into danilowoz:master Mar 6, 2019
@danilowoz

Copy link
Copy Markdown
Owner

🎉 This PR is included in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants