Move image download example in dev_plugin to separate entrypoint to not slow down detail-view

This commit is contained in:
Exidex 2025-01-18 22:42:32 +01:00
parent 7c440c5dcd
commit 66bf1c861c
No known key found for this signature in database
GPG key ID: 46D8D21671EB48FA
3 changed files with 19 additions and 1 deletions

View file

@ -32,6 +32,12 @@ type = 'bool'
default = true
description = "test bool description"
[[entrypoint]]
id = 'detail-img-download-view'
name = 'Detail Img Download view'
path = 'src/detail-img-download-view.tsx'
type = 'view'
description = """"""
[[entrypoint]]
id = 'detail-view'

View file

@ -0,0 +1,13 @@
import { ReactElement } from 'react';
import { Detail } from "@project-gauntlet/api/components";
export default function DetailView(): ReactElement {
return (
<Detail>
<Detail.Content>
<Detail.Content.Image source={{ url: "https://github.com/project-gauntlet/gauntlet/blob/main/docs/logo.png?raw=true" }}/>
</Detail.Content>
</Detail>
);
};

View file

@ -124,7 +124,6 @@ export default function DetailView(): ReactElement {
<Detail.Content.H5>H5 Title</Detail.Content.H5>
<Detail.Content.H6>H6 Title</Detail.Content.H6>
<Detail.Content.Image source={{ asset: "logo.png" }}/>
<Detail.Content.Image source={{ url: "https://github.com/project-gauntlet/gauntlet/blob/main/docs/logo.png?raw=true" }}/>
<Detail.Content.CodeBlock>Code block Test</Detail.Content.CodeBlock>
<Detail.Content.HorizontalBreak/>
<Detail.Content.Paragraph>