Created a mixin for transition