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

https://github.com/fujiharuka/the-site-components

Components for the-site
https://github.com/fujiharuka/the-site-components

Last synced: 3 months ago
JSON representation

Components for the-site

Awesome Lists containing this project

README

        

the-site-components
==========

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/the-labo/the-site-components
[bd_travis_url]: http://travis-ci.org/the-labo/the-site-components
[bd_travis_shield_url]: http://img.shields.io/travis/the-labo/the-site-components.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/the-labo/the-site-components
[bd_travis_com_shield_url]: https://api.travis-ci.com/the-labo/the-site-components.svg?token=
[bd_license_url]: https://github.com/the-labo/the-site-components/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/the-labo/the-site-components
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/the-labo/the-site-components.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/the-labo/the-site-components.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/the-labo/the-site-components
[bd_gemnasium_shield_url]: https://gemnasium.com/the-labo/the-site-components.svg
[bd_npm_url]: http://www.npmjs.org/package/the-site-components
[bd_npm_shield_url]: http://img.shields.io/npm/v/the-site-components.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

Components for the-site

Installation
-----

```bash
$ npm install the-site-components --save
```

Usage
---------

```javascript
'use strict'

import React from 'react'
import {
TheSignInForm,
TheSignUpForm,
TheOperationList,
TheCreateDialog,
} from 'the-site-components'

import { withForm, TheThemeStyle, TheIcon } from 'the-components'

const SignInForm = withForm(TheSignInForm)
const SignUpForm = withForm(TheSignUpForm)

class ExampleComponent extends React.Component {
constructor (props) {
super(props)
this.state = {
signInValues: {},
signUpValues: {},
signUpStep: 0
}
}

render () {
const l = (key) => ({})[key] || key.split(/\./g).pop()
return (




TheSignInForm



this.setState({signInValues: Object.assign(this.state.signInValues, signInValues)})}
/>

SignUpForm



this.setState({signUpValues: Object.assign(this.state.signUpValues, signUpValues)})}
step={this.state.signUpStep}
onStep={(signUpStep) => this.setState({signUpStep})}
/>


TheOperationList



)
}
}

export default ExampleComponent

```

Components
-----------

### TheConnectionRetryDialog

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `reloadIcon` | | | `null` |
| `warningIcon` | | | `null` |

### TheCreateDialog

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `doneTitle` | | | `title` |

### TheDestroyDialog

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `renderItem` | | | `(entity) => entity.name` |

### TheFBLoginButton

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `callbackName` | | | `'onFBLoginForFBLoginButton'` |
| `ready` | | | `false` |

### TheLocaleForm

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `icon` | | | `'fas fa-globe'` |
| `name` | | | `'locale'` |

### TheOperationDialog

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `renderItem` | | | `({name}) => name` |

### TheOperationList

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `busy` | | | `false` |
| `entities` | | | `[]` |
| `fields` | | | `{}` |
| `isChecked` | | | `() => false` |
| `isFreezed` | | | `() => false` |
| `keys` | | | `null` |
| `onUpdateCheck` | | | `() => null` |

### TheOperationPager

### ThePasswordChangeForm

### TheProfileEditForm

### TheRecoverResetForm

### TheRecoverSendForm

### TheSearchForm

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `autoFocus` | | | `false` |
| `name` | | | `'q'` |

### TheSigninForm

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `nameParser` | | | `userNameParser` |

### TheSignUpForm

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `nameParser` | | | `userNameParser` |
| `required` | | | `['name', 'password', 'profile.email']` |
| `step` | | | `0` |

### TheSiteToasts

### TheUserCreateForm

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `roles` | | | `{}` |

### TheUserImage

**Props**

| Name | Type | Description | Default |
| --- | --- | ---- | ---- |
| `size` | | | `48` |

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the-site-components/blob/master/LICENSE).

Links
------

+ [THE Labo][t_h_e_labo_url]

[t_h_e_labo_url]: https://github.com/the-labo