mirror of
https://github.com/directus/directus.git
synced 2026-02-16 15:15:19 -05:00
Update documentation of app (#4222)
* move component docs to documentation * update app docs tables for components * update docs * Add components to docs sidebar * fix generated tables * fix tables * rename transitions * update tables * update nested components * update tables * update tables * update tables * update v-table table * add basic documentation to each component * remove all stories of storybook * add missing documentation * undate tables * update tables * update docs sidebar * update app docs * remove unused references * add general readme * update docs * make reference titiles smaller * add reference tag * improve docs * update order of tabs in sidebar * remove all readmes and stories from interfaces/displays * Cleanup menu * Remove storybook Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
import withPadding from '../../../.storybook/decorators/with-padding';
|
||||
import { defineComponent, ref } from '@vue/composition-api';
|
||||
import { boolean, withKnobs, optionsKnob } from '@storybook/addon-knobs';
|
||||
import readme from './readme.md';
|
||||
import i18n from '@/lang';
|
||||
import RawValue from '../../../.storybook/raw-value.vue';
|
||||
import CodeMirror from 'codemirror';
|
||||
import 'codemirror/mode/meta';
|
||||
|
||||
const choices = {} as Record<string, string>;
|
||||
|
||||
CodeMirror.modeInfo.forEach((e) => (e.name === 'JSON' ? (choices[e.name] = 'JSON') : (choices[e.name] = e.mode)));
|
||||
|
||||
export default {
|
||||
title: 'Interfaces / Code',
|
||||
decorators: [withPadding, withKnobs],
|
||||
parameters: {
|
||||
notes: readme,
|
||||
},
|
||||
};
|
||||
|
||||
export const basic = () =>
|
||||
defineComponent({
|
||||
components: { RawValue },
|
||||
i18n,
|
||||
props: {
|
||||
lineNumber: {
|
||||
default: boolean('Line Number', true),
|
||||
},
|
||||
disabled: {
|
||||
default: boolean('Disabled', false),
|
||||
},
|
||||
language: {
|
||||
default: optionsKnob('Language', choices, 'markdown', {
|
||||
display: 'select',
|
||||
}),
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
const value = ref(
|
||||
`# This is the editor.
|
||||
_It starts out in markdown mode_,
|
||||
**use the control below to load and apply a mode**
|
||||
"you'll see the highlighting of" this text *change*.`
|
||||
);
|
||||
return { value };
|
||||
},
|
||||
template: `
|
||||
<div :style="{
|
||||
maxWidth: '632px'
|
||||
}">
|
||||
<interface-code
|
||||
v-model="value"
|
||||
v-bind="{ lineNumber, disabled, language }"
|
||||
/>
|
||||
<raw-value>{{ value }}</raw-value>
|
||||
</div>
|
||||
`,
|
||||
});
|
||||
Reference in New Issue
Block a user