forked from contentful/field-editors
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Suevalov
authored
Apr 24, 2020
1 parent
7e151d8
commit 1d2dc9f
Showing
76 changed files
with
671 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,11 @@ | ||
# @contentful/field-editor-boolean | ||
|
||
This package contains a React `BooleanEditor` component and an extension that is used as default for `Boolean` field type in the Contentful web application. | ||
```bash | ||
npm install @contentful/field-editor-boolean | ||
``` | ||
|
||
## Commands | ||
This package contains a React `BooleanEditor` component that is used as default for `Boolean` field type in the Contentful web application. | ||
|
||
Uses [`tsdx`](https://github.com/palmerhq/tsdx) - a zero-config CLI that helps you develop, test, and publish modern TypeScript packages with ease. | ||
|
||
### `yarn watch` | ||
|
||
Runs the project in development/watch mode. Your library will be rebuilt if you make edits. | ||
|
||
### `yarn build` | ||
|
||
Bundles the package to the `dist` folder. | ||
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module). | ||
|
||
### `yarn test` | ||
|
||
Runs the test watcher (Jest) in an interactive mode. | ||
By default, runs tests related to files changed since the last commit. | ||
|
||
For more information check [`tsdx` documentation](https://github.com/palmerhq/tsdx) out. | ||
```js | ||
import { BooleanEditor } from '@contentful/field-editor-boolean'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
--- | ||
name: Boolean | ||
route: /boolean | ||
menu: Components | ||
menu: Editors | ||
--- | ||
|
||
# Boolean | ||
import Readme from '../README.md'; | ||
|
||
import { Playground } from 'docz'; | ||
<Readme /> | ||
|
||
import { Playground, Props } from 'docz'; | ||
import { BooleanEditor } from './BooleanEditor.tsx'; | ||
import { createFakeFieldAPI } from '@contentful/field-editor-test-utils'; | ||
import { createFakeFieldAPI, ActionsPlayground } from '@contentful/field-editor-test-utils'; | ||
|
||
## In Action | ||
|
||
<Playground> | ||
{() => { | ||
const [field] = createFakeFieldAPI(); | ||
return <BooleanEditor field={field} isInitiallyDisabled={false} />; | ||
const [field, mitt] = createFakeFieldAPI(); | ||
return ( | ||
<div> | ||
<BooleanEditor field={field} isInitiallyDisabled={false} /> | ||
<ActionsPlayground mitt={mitt} /> | ||
</div> | ||
); | ||
}} | ||
</Playground> | ||
|
||
## Props | ||
|
||
<Props of={BooleanEditor} /> |
Oops, something went wrong.