Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leguass7/rollcolumn-react


https://github.com/leguass7/rollcolumn-react

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        


Avatar Solucoes Digitais

# rollcolumn-react
[![NPM](https://img.shields.io/npm/v/rollcolumn-react.svg)](https://www.npmjs.com/package/rollcolumn-react)[![License: MIT](https://img.shields.io/github/license/avatarsolucoes/rollcolumn-react.svg)](LICENSE)

> React **web** component

view in production: http://rollcolumn-react.avatarsolucoesdigitais.com.br

## Install

```bash
yarn add rollcolumn-react
```
or
```bash
npm i rollcolumn-react
```

## Usage

**with label:**
```jsx
import React from 'react'
import RollColumn, { Column, LabelColumn } from 'rollcolumn-react'

export default function Page() {
return (




Content 1


goto 2


Content 2


back to 1



)
}
```

**external navigation (without label component):**

```jsx
import React from 'react'
import RollColumn, { Column, LabelColumn, gotoColumn } from 'rollcolumn-react'

export default function Page() {

function goto(columnNumber) {
gotoColumn('myName', columnNumber)
}

return (




Content 1


goto 2


{ goto(2) }}>GOTO 2


Content 2


back to 1


{ goto(1) }}>GOTO 1



other content


{ goto(2) }}>GOTO 2


)
}
```

**events:**

```jsx
import React from 'react'
import RollColumn, { Column, LabelColumn, gotoColumn } from 'rollcolumn-react'

export default function Page() {

function handleColumnCheck(elementChecked){
console.log('handleColumnCheck', elementChecked);
}

function goto(columnNumber) {
// gotoColumn params: (name, number_column, emit_event)
gotoColumn('myName', columnNumber, true)
}

return (




Content 1


goto 2


{ goto(2) }}>GOTO 2


Content 2


back to 1


{ goto(1) }}>GOTO 1



other content


{ goto(2) }}>GOTO 2


)
}
```

## Contributing

Thanks for being interested on making this package better. We encourage everyone to help improving this project with some new features, bug fixes and performance issues.

## License
MIT © [Avatar Soluções Digitais](https://github.com/avatarsolucoes/rollcolumns-react.git)