https://github.com/jrop/react-toolbox-screen-stack
https://github.com/jrop/react-toolbox-screen-stack
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jrop/react-toolbox-screen-stack
- Owner: jrop
- Created: 2016-09-30T20:18:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-01T17:30:02.000Z (almost 9 years ago)
- Last Synced: 2025-03-11T10:49:06.507Z (over 1 year ago)
- Language: JavaScript
- Size: 223 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React-Toolbox Screen-Stack
An Android-like activity-stack implementation.

# Installation
```sh
npm install --save-dev react-toolbox-screen-stack
```
# Usage
```js
import 'normalize.css'
import 'react-toolbox/lib/commons.scss'
import React from 'react'
import ReactDOM from 'react-dom'
import AppBar from 'react-toolbox/lib/app_bar'
import { Button } from 'react-toolbox/lib/button'
import { Layout, Panel } from 'react-toolbox/lib/layout'
import { Screen, Stack } from 'react-toolbox-screen-stack'
const Padded = ({ children }) =>
{children}
class Home extends React.Component {
render() {
// use "Screen" as a way to create a quick AppBar
return
This is the home screen
this.props.stack.push()} />
}
}
class About extends React.Component {
render() {
// return your own layouts to use:
return
This is the about screen
this.props.stack.pop()} />
}
}
window.addEventListener('load', function () {
ReactDOM.render(, document.getElementById('react'))
})
```
# License (ISC)
Copyright (c) 2016, Company or Person's Name
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.