@@ -34,14 +34,10 @@ const getClassNames = (type: TransitionProps['type']) => ({
3434} )
3535
3636/**
37- * ---
38- * private: true
39- * ---
4037 * Generates the style object from the theme and provided additional information
41- * @param {Object } componentTheme The theme variable object.
42- * @param {Object } props the props of the component, the style is applied to
43- * @param {Object } state the state of the component, the style is applied to
44- * @return {Object } The final style object, which will be used in the component
38+ * @param componentTheme The theme variable object.
39+ * @param props the props of the component, the style is applied to
40+ * @return The final style object, which will be used in the component
4541 */
4642const generateStyle = (
4743 componentTheme : TransitionTheme ,
@@ -54,10 +50,12 @@ const generateStyle = (
5450 * the old BaseTransition functionality with adding and removing
5551 * classes was to add the `Global` helper of `emotion`
5652 *
53+ * `!important` is added, so it overrides any other animation
54+ * (this class is only on the DOM node while the animation is running)
55+ *
5756 * Todo: refactor or replace Transition/BaseTransition component in v9.0.0. so that it is not class based
5857 */
59-
60- const baseTransition = `opacity ${ componentTheme . duration } ${ componentTheme . timing } , transform ${ componentTheme . duration } ${ componentTheme . timing } `
58+ const baseTransition = `opacity ${ componentTheme . duration } ${ componentTheme . timing } , transform ${ componentTheme . duration } ${ componentTheme . timing } !important`
6159
6260 /* Animation type: fade */
6361 const fadeAnimation = {
0 commit comments