Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/modernpoacher/shinkansen-gears
Gears for Zashiki Karakuri
https://github.com/modernpoacher/shinkansen-gears
components form react react-router
Last synced: 2 months ago
JSON representation
Gears for Zashiki Karakuri
- Host: GitHub
- URL: https://github.com/modernpoacher/shinkansen-gears
- Owner: modernpoacher
- Created: 2019-09-06T17:21:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-14T03:17:34.000Z (9 months ago)
- Last Synced: 2024-04-14T13:57:13.611Z (9 months ago)
- Topics: components, form, react, react-router
- Language: JavaScript
- Homepage:
- Size: 23.4 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## `shinkansen-gears`
# Gears
*Gears* implements *React* + *React Router* navigation components for *Zashiki Karakuri*.
## Usage
```javascript
import {
Gears
} from 'shinkansen-gears'
```*Gears* exposes the props `reverse`, `forward`, and `pattern`.
These props are _optional_. If no props are given then *Gears* will render `null`.
*Gears* depends on a peer of *[Shinkansen Rails](https://github.com/modernpoacher/shinkansen-rails)* to transform the props `reverse` and `forward` into `` components for *React Router*. (The prop `pattern` describes how `reverse` and `forward` should be transformed.)
```javascript
import React from 'react'
import PropTypes from 'prop-types'export class Gears extends React.Component { }
Gears.propTypes = {
reverse: PropTypes.shape({
alpha: PropTypes.string,
omega: PropTypes.string
}),
forward: PropTypes.shape({
alpha: PropTypes.string,
omega: PropTypes.string
}),
pattern: PropTypes.string
}
```## See also
- [Rails](https://github.com/modernpoacher/shinkansen-rails)
- [Pantograph](https://github.com/modernpoacher/shinkansen-pantograph)