0.2.17 • Published 4 years ago
@kuworking/block-landing-four v0.2.17
BLOCK LANDING FOUR
React component coded in ES6
🚀 Installation
yarn add @kuworking/block-landing-four
🔥 How to Use
import React from 'react'
import { Structure } from '@kuworking/block-landing-four'
// folder locates the images
const MyComponent = () => (
<>
<Structure folder="/" />
</>
)
See the needed images in the codesandbox, find the links at kuworking
🖖 Integration in Gatsby
Since the package does not start with gatsby-theme
, it is not included by default in the transpilation
Then, you need to do it with the plugin gatsby-plugin-compile-es6-packages
and include it in gatsby-config.js
{
"resolve": `gatsby-plugin-compile-es6-packages`,
"options": {
"modules": ["@kuworking/block-landing-four"]
}
}
🖖 Integration in React
Take a look at the codesandbox, I've used this package.json
and this babel configuration
{
"dependencies": {
"react": "16.12.0",
"react-dom": "16.12.0",
"react-scripts": "3.0.1"
},
"devDependencies": {
"@babel/cli": "7.10.5",
"@babel/plugin-transform-modules-commonjs": "7.10.4",
"@babel/preset-react": "7.10.4",
"babel-core": "6.26.3"
}
}
{
"presets": ["@babel/preset-react"],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
🖖 Integration in WordPress
Ready to be used as a Gutenberg block, see the repo in www.kuworking.com
(work in progress)