0.2.9 • Published 2 years ago

layouter-tools v0.2.9

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Layouter

A package designed to save time in connecting your CMS app layouts to your arrangements of react components.

Install

npm -i --save layouter-tools

Usage

Import nessisary dependencies

import { Provider, Body } from 'layouter-tools';

Define the layouterToolsOptions variable

function App() {
	const layouterToolsOptions = {
		PUBLIC_API_KEY: 'bjwi19ta',
		sectionMap: [
			{
				section: 'landingScreenSection',
				component: () => {
					return <div>This is the Landing section</div>;
				},
			},
			{
				section: 'funnelItem01Section',
				component: () => {
					return <div>This is the Funnel section</div>;
				},
			},
			{
				section: 'shopDisplaySection',
				component: () => {
					return <div>This is the shop section</div>;
				},
			},
	};
}

export default App;

Use layouterToolsOptions as a prop for the Provider component

function App() {
	return (
		<div className='App'>
			<Provider options={layouterToolsOptions}>
				<Body />
			</Provider>
		</div>
	);
}

export default App;

Entire Usage example

//App.js of Create React app
import logo from './logo.svg';
import './App.css';
import { Provider, Body } from 'layouter-tools';

function App() {
	const layouterToolsOptions = {
		PUBLIC_API_KEY: '******',
		sectionMap: [
			{
				section: 'landingScreenSection',
				component: () => {
					return <div>This is the Landing section</div>;
				},
			},
			{
				section: 'funnelItem01Section',
				component: () => {
					return <div>This is the Funnel section</div>;
				},
			},
			{
				section: 'shopDisplaySection',
				component: () => {
					return <div>This is the shop section</div>;
				},
			},
	};
	return (
		<div className='App'>
			<Provider options={layouterToolsOptions}>
				<Body />
			</Provider>
		</div>
	);
}

export default App;
0.2.9

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago