Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Aos innerblock
import AOS from 'aos';
import 'aos/dist/aos.css';
const { __ } = wp.i18n;
const { Component } = wp.element;
const { registerBlockType, InnerBlocks } = wp.blocks;
class App extends Component {
constructor(props){
super(props);
}
componentDidMount(){
AOS.init({
duration : 2000
})
}
render(){
return(
<div data-aos='fade-up'>
<InnerBlocks />
</div>
)
}
};
registerBlockType( 'my-plugin/my-block', {
title: __( 'Aos' ),
icon: 'universal-access-alt',
category: 'layout',
edit: App,
save() {
return (
<div>
<InnerBlocks.Content />
</div>
);
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.