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

Popover animation flexibility #2367

Merged
merged 1 commit into from
Dec 4, 2015
Merged

Conversation

chrismcv
Copy link
Contributor

@chrismcv chrismcv commented Dec 4, 2015

This PR allows popover to be passed an animation component that is responsible for animating its open and close.

@oliviertassinari I tried react-motion, but struggled to get it to work as I wanted, so I've just extracted the animation css parts.

The other weirdness is that the outer element needs to provide the border zDepth because the box-shadow on paper is effectively an overflow.

const {
let {
animation,
style,
Copy link
Member

Choose a reason for hiding this comment

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

I think that we should add children and ...other.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


return (
<Paper
style={this.mergeAndPrefix(styles.base, style, openStyles.base)}
Copy link
Member

Choose a reason for hiding this comment

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

Could you use prepareStyles instead?
mergeAndPrefix is adding the prefixes, however Paper is already doing it. No need to do it twice. Plus, it's deprecated, we should update our code base to use prepareStyles, that is also handling the RTL with the prefixes.

@oliviertassinari
Copy link
Member

@chrismcv That's my last feedback, nice work 👍

@chrismcv chrismcv force-pushed the pop-anim branch 2 times, most recently from cfeb50d to 5f73c33 Compare December 4, 2015 23:32
import DefaultRawTheme from '../styles/raw-themes/light-raw-theme';
import ThemeManager from '../styles/theme-manager';
import Extend from '../utils/extend';
import PopoverAnimation from './popover-default-animation';
Copy link
Member

Choose a reason for hiding this comment

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

Name doesn't match here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Popover The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants