riots studio support
Helpers aimed at being used inside mdjs/mdx files to interact with the studio
Table of Contents
InstallThis project uses npm. Go check them out if you don't have them locally installed.
$ npm install --save @divriots/studio-support
import { navigateTo } from '@divriots/studio-support";
API
navigateTo({file: string, goToFile = true, start?: number, end?: number})This helper will select the requested file in the editor files tabs, and highlight the given range (if provided).
If goToFile
is false, then only the highlighting part will be performed, only if the given file is already selected.
import { navigateTo } from "@divriots/studio-support";
navigateTo({
file: 'src/index.stories.js'
start: 5,
end: 10
});
Helpers aimed at being used inside mdjs/mdx files to interact with the studio
Table of Contents
Install
This project uses npm. Go check them out if you don't have them locally installed.
$ npm install --save @divriots/studio-support
import { navigateTo } from '@divriots/studio-support";
API
navigateTo({file: string, goToFile = true, start?: number, end?: number})
This helper will select the requested file in the editor files tabs, and highlight the given range (if provided).
If goToFile
is false, then only the highlighting part will be performed, only if the given file is already selected.
import { navigateTo } from "@divriots/studio-support";
navigateTo({
file: 'src/index.stories.js'
start: 5,
end: 10
});