-
Notifications
You must be signed in to change notification settings - Fork 609
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
Changing slide animation #86
Comments
I've started looking at this, one thing I can't quite get is why all the styled components are using a function call type of construction rather than the more common tagged template literal construction - @jxnblk are you able to shed some light? |
Thanks! Yeah, I suspect custom animations could maybe be handled with components that can be exported as layouts (using CSS animations, etc) or maybe through custom theme configurations. I haven't thought a ton about it yet, so would like to see some proposals/APIs before moving forward with this sort of thing – as for the syntax, I find it easier to read and type in JS as opposed to using an embedded DSL |
How do you feel about |
For per-slide animations, I was imagining something more like how layouts work for components, e.g. import { Fade } from 'mdx-deck/animations'
export default Fade
# Fade In/Out
---
# No animation For all slides, the other thing I'm thinking is adding a default CSS animation to a theme, maybe something like: // example theme
import baseTheme from 'mdx-docks/themes'
export default {
...baseTheme,
animationDuration: '.4s',
animationEnter: {
from: {
opacity: 0
},
to: {
opacity: 1
}
},
animationLeave: {
// ...animation keyframes
}
} |
I like the idea of adding to the theme. I'm a bit confused by |
Yeah, I don't yet understand how default exports could accommodate both a custom layout and a specific slide transition. |
You can use composition in React/JSX to nest one component inside the other |
I attempted to get something like this working as a Layout but the problem is that Layouts don't receive any of their parent props, so there's no way to know when the slide is |
Since v2 now uses Reach Router, slides do not transition by default. In order to add route transitions, existing solutions for Reach Router should work |
Hey, love this project! Is there a way to change the slide animation, ideally through some configuration like
export { fade as animation } from 'mdx-deck/animations
? If not I'd like to look into working on that, if I could have a few pointers 🤓The text was updated successfully, but these errors were encountered: