1.1.8 • Published 3 years ago

@nati070/one-page-sections-library v1.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

One-Page-Sections-Library

The One-Page-Sections-Library gives a head start for one-page web development in React, allowing you to start writing the web page itself.

Installation

npm i @nati070/one-page-sections-library

Getting started

To get started you need to be familiar with two components.

Sections - wrap all the Section components.

Section - every page that you need, create with a Section component. Section has 3 property

  • name(required) - define the id of the page and have to be unique for each page.

  • backgroundColor(optional) - The backgroundColor property sets the background color of an element(same as CSS). the default color is white.

  • component(optional) - A React element to render when the route is matched, highly recommended to use it for prettier code.

import { Sections,Section } from  '@nati070/one-page-sections-library';
import  FirstComp  from  './FirstComp';
import  SecondComp  from  './SecondComp';

const  Main = () => {
return (
	<Sections>
		<Section  backgroundColor='#D4D4AA'  name='first'  component={<FirstComp/>}/>
		<Section  backgroundColor='#E8871E'  name='second'  component={<SecondComp/>}/>
	</Sections>
);};
export  default  Main;

Screenshot

enter image description here

GitHub example link: here

## Documentation

soon

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago