-
-
Notifications
You must be signed in to change notification settings - Fork 420
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
feat: add animation begin support on web #280
feat: add animation begin support on web #280
Conversation
@@ -126,6 +126,7 @@ const MyLoader = () => ( | |||
| **`style?: React.CSSProperties`** <br /> Defaults to `{}` | React DOM only | | | |||
| **`uniqueKey?: string`** <br /> Defaults to random unique id | React DOM only | Use the same value of prop key, <br/>that will solve inconsistency on the SSR, see more [here](https://github.com/danilowoz/react-content-loader/issues/78). | | |||
| **`beforeMask?: JSX.Element`** <br /> Defaults to null | React DOM<br/>React Native | Define custom shapes before content, <br/>see more [here](https://github.com/danilowoz/react-content-loader/issues/266). | | |||
| **`animateBegin?: string`** <br /> Defaults to `undefined` | React DOM only | Delay before the animation begins, identical to the [SVG animate element begin attribute](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/begin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to co-locate this prop with the animate
property above, but it looks like so far props in this list seem to have been added chronologically.
parameters: { | ||
notes: `##\`animateBegin?: string\` | ||
|
||
Defaults to \`0s\`. This attribute accepts the same values as the SVG animate element's [\`begin\` attribute](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/begin).`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note default to 0s
is only implicit here; the actual default value lives with the begin
attribute itself on the animation
element.
@danilowoz would love to get feedback on this — let me know if there's anything I can do to help it get merged 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, sorry for the late answer! This looks good to me. Any reason why package-lock.json
got so many changes? I think we could ignore it for while
🎉 This PR is included in version 6.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
This PR adds a prop to expose the underlying web SVG
animation
element'sbegin
attribute.(My specific motivation is to then be able to use this field to stagger a series of loading component animations, but I can imagine broader use-cases as well given the other possible values of the
begin
attribute.)Related Issue #[issue number]
None
Any Breaking Changes
None
Checklist