4.4.0 • Published 1 month ago

@diplodoc/components v4.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

NPM version

YFM Docs Components

Компоненты для Yandex Flavored Markdown Documentation.

Installation

npm i @diplodoc/components

Usage

Append js

// In most cases append transform runtime
import "@doc-tools/transform/dist/js/yfm.js";

import {createRoot} from 'react-dom/client';
import {ThemeProvider} from '@gravity-ui/uikit';

// configure components
import {configure as configureUikit} from '@gravity-ui/uikit';
import {configure as configureDocs} from '@diplodoc/components';

configureUikit({lang: 'ru'});

// can be reconfigured in any moment
configureDocs({
    lang: 'ru',
    // optionally configure allowed translations
    loc: {ru, en, tr, ...}
})

// The theme must be applied. To do that wrap your app in ThemeProvider
const root = createRoot(document.getElementById('root'));
root.render(
    <ThemeProvider theme="light">
        <App />
    </ThemeProvider>,
);

Append css

/*project.css*/

/*Append components styles*/
@import '@diplodoc/components';

/*Append components theme*/
@import '@diplodoc/components/themes/common';

/*In most cases append transform styles*/
@import '@doc-tools/transform/dist/css/yfm.css';

Development

To build the project correctly you need to install python@2. Visit python.org/downloads to get the latest version.

Install Dependencies

npm ci
cd demo && npm ci

To start the development server with storybook run the following:

npm run dev

License

MIT

4.4.0

1 month ago

4.3.0

1 month ago

3.10.1

2 months ago

3.10.0

2 months ago

4.2.0

2 months ago

4.2.0-beta.0

2 months ago

4.1.0

2 months ago

4.0.0

2 months ago

3.10.0-beta.1

3 months ago

3.10.0-beta.0

3 months ago

3.9.1

3 months ago

3.9.0

3 months ago

3.8.0-beta.1

4 months ago

3.8.0

4 months ago

3.8.0-beta.0

4 months ago

3.7.0

5 months ago

3.6.0

5 months ago

3.5.1

5 months ago

3.5.0

6 months ago

3.4.0

6 months ago

3.3.1

7 months ago

3.3.0

7 months ago

3.2.0

7 months ago

3.1.0

7 months ago

3.0.5

8 months ago

3.0.4

8 months ago

3.0.3

8 months ago

3.0.2

8 months ago

3.0.1

8 months ago

3.0.0

8 months ago

3.0.0-alpha-8

8 months ago

3.0.0-alpha-7

8 months ago

3.0.0-alpha-6

8 months ago

3.0.0-alpha-5

8 months ago

3.0.0-alpha-4

8 months ago

3.0.0-alpha-3

8 months ago

3.0.0-alpha-2

8 months ago

3.0.0-alpha-1

8 months ago