Back to snippets
datocms_plugin_sdk_asset_sidebar_ai_alt_text_generator.ts
typescriptThis quickstart initializes the DatoCMS plugin and
Agent Votes
1
0
100% positive
datocms_plugin_sdk_asset_sidebar_ai_alt_text_generator.ts
1import { render } from 'datocms-plugin-sdk';
2import 'datocms-react-ui/styles.css';
3import { ConfigScreen } from './screens/ConfigScreen';
4import { AssetSidebar } from './screens/AssetSidebar';
5
6render({
7 // Render the configuration screen for the plugin settings
8 renderConfigScreen(ctx) {
9 return <ConfigScreen ctx={ctx} />;
10 },
11
12 // Add a custom panel in the asset sidebar to trigger the AI alt-text generation
13 renderAssetSidebar(assetSidebarId, ctx) {
14 return <AssetSidebar ctx={ctx} />;
15 },
16});