Skip to content

Commit

Permalink
docs: organize extension stories in separate section (#1059)
Browse files Browse the repository at this point in the history
By now, there are quite a bit of stories in storybook. The extension-related ones are now grouped into a separate section to make it easier to find them back.
  • Loading branch information
ronnyroeller committed Aug 16, 2021
1 parent 60b2cf4 commit 2b63a6f
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/extensions/annotation-extension.md
Expand Up @@ -65,7 +65,7 @@ The extension is provided by the `@remirror/extension-annotation` package. There

### Examples

See [storybook](https://remirror.vercel.app/?path=/story/annotation-extension--basic) for example usage.
See [storybook](https://remirror.vercel.app/?path=/story/extensions-annotation--basic) for example usage.

## API

Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/callout-extension.md
Expand Up @@ -64,7 +64,7 @@ The extension is provided by the `@remirror/extension-callout` package. There ar

### Examples

See [storybook](https://remirror.vercel.app/?path=/story/callouts--basic) for examples.
See [storybook](https://remirror.vercel.app/?path=/story/extensions-callout--basic) for examples.

## API

Expand Down
4 changes: 1 addition & 3 deletions docs/extensions/markdown-extension.md
Expand Up @@ -90,9 +90,7 @@ The extension is provided by the `@remirror/extension-markdown` package. There a

### Examples

#### A pure markdown editor

#### A dual editor with markdown
See [storybook](https://remirror.vercel.app/?path=/story/markdown-editor--basic) for examples.

## API

Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/placeholder-extension.md
Expand Up @@ -33,7 +33,7 @@ The extension is provided by the `@remirror/extension-placeholder` package. Ther

### Examples

See [storybook](https://remirror.vercel.app/?path=/story/placeholder-extension--basic) for examples.
See [storybook](https://remirror.vercel.app/?path=/story/extensions-placeholder--basic) for examples.

## API

Expand Down
Expand Up @@ -25,7 +25,7 @@ import {
useRemirrorContext,
} from '@remirror/react';

export default { title: 'Annotation Extension' };
export default { title: 'Extensions / Annotation' };

const SAMPLE_TEXT = 'This is a sample text';

Expand Down
Expand Up @@ -15,7 +15,7 @@ import {
useRemirrorContext,
} from '@remirror/react';

export default { title: 'Callouts' };
export default { title: 'Extensions / Callout' };

const EmojiPicker = () => {
const pickerRef = useRef(new EmojiButton({ position: 'bottom', autoFocusSearch: false }));
Expand Down
Expand Up @@ -4,7 +4,7 @@ import { CodeBlockExtension } from 'remirror/extensions';
import { ProsemirrorDevTools } from '@remirror/dev';
import { Remirror, ThemeProvider, useEditorState, useRemirror } from '@remirror/react';

export default { title: 'Code Block extension' };
export default { title: 'Extensions / Code Block' };

const Dev = () => {
const updatedState = useEditorState();
Expand Down
Expand Up @@ -8,7 +8,7 @@ import CodeMirror from 'codemirror';
import { CodeMirrorExtension } from 'remirror/extensions';
import { Remirror, ThemeProvider, useRemirror } from '@remirror/react';

export default { title: 'Codemirror5 extension' };
export default { title: 'Extensions / Codemirror5' };

export const Basic = (): JSX.Element => {
const { manager, state } = useRemirror({ extensions, content, stringHandler: 'html' });
Expand Down
Expand Up @@ -5,7 +5,7 @@ import { IframeExtension } from 'remirror/extensions';
import { htmlToProsemirrorNode } from '@remirror/core';
import { Remirror, ThemeProvider, useCommands, useRemirror } from '@remirror/react';

export default { title: 'Iframe' };
export default { title: 'Extensions / Iframe' };

export const Basic: React.FC = () => {
const { manager, state, onChange } = useRemirror({
Expand Down
Expand Up @@ -9,7 +9,7 @@ import { createBaseuploadFileUploader } from '../src/file-uploaders/bashupload-f
import { createObjectUrlFileUploader } from '../src/file-uploaders/object-url-file-uploader';
import { createSlowFileUploader } from '../src/file-uploaders/slow-file-uploader';

export default { title: 'File extension' };
export default { title: 'Extensions / File' };

export const Default = (): JSX.Element => {
const extensions = useCallback(() => [new FileExtension({})], []);
Expand Down
Expand Up @@ -5,7 +5,7 @@ import { ImageExtension } from 'remirror/extensions';
import { htmlToProsemirrorNode } from '@remirror/core';
import { Remirror, ThemeProvider, useRemirror } from '@remirror/react';

export default { title: 'Image' };
export default { title: 'Extensions / Image' };

const basicExtensions = () => [new ImageExtension()];

Expand Down
Expand Up @@ -33,7 +33,7 @@ import {
useUpdateReason,
} from '@remirror/react';

export default { title: 'Link Extension' };
export default { title: 'Extensions / Link' };

const mentionAtomItems: MentionAtomNodeAttributes[] = [
{ id: 'tom', label: '@tom' },
Expand Down
Expand Up @@ -10,7 +10,7 @@ import { EditorComponent, Remirror, ThemeProvider, useRemirror } from '@remirror

import { TaskListExtension } from '../src/task-list-extension';

export default { title: 'List Extension' };
export default { title: 'Extensions / List' };

export const Basic = (): JSX.Element => {
const { manager, state } = useRemirror({
Expand Down
Expand Up @@ -4,7 +4,7 @@ import { useCallback } from 'react';
import { PlaceholderExtension } from 'remirror/extensions';
import { Remirror, ThemeProvider, useRemirror } from '@remirror/react';

export default { title: 'Placeholder Extension' };
export default { title: 'Extensions / Placeholder' };

export const Basic = (): JSX.Element => {
const extensions = useCallback(
Expand Down
Expand Up @@ -16,7 +16,7 @@ import {
useRemirror,
} from '@remirror/react';

export default { title: 'Positioner Extension' };
export default { title: 'Extensions / Positioner' };

const extensions = () => [
new HeadingExtension(),
Expand Down
Expand Up @@ -16,7 +16,7 @@ import {
useRemirrorContext,
} from '@remirror/react';

export default { title: 'React Tables extension' };
export default { title: 'Extensions / React Tables (complex)' };

const CommandMenu: React.FC = () => {
const { commands } = useRemirrorContext();
Expand Down
Expand Up @@ -7,7 +7,7 @@ import {
useRemirrorContext,
} from '@remirror/react';

export default { title: 'Tables extension' };
export default { title: 'Extensions / Tables (simple)' };

const CommandMenu = () => {
const ctx = useRemirrorContext();
Expand Down

1 comment on commit 2b63a6f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://remirror.io as production
🚀 Deployed on https://611a9c8b6f08f91351526e98--remirror.netlify.app

Please sign in to comment.