mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
Inline view examples
This commit is contained in:
parent
90957f214a
commit
d721bda736
50 changed files with 459 additions and 25 deletions
2
example_plugins/plugins/ui_inline_code_block/.gitignore
vendored
Normal file
2
example_plugins/plugins/ui_inline_code_block/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
dist
|
||||
node_modules
|
||||
16
example_plugins/plugins/ui_inline_code_block/gauntlet.toml
Normal file
16
example_plugins/plugins/ui_inline_code_block/gauntlet.toml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gauntlet]
|
||||
name = 'Docs Inline'
|
||||
description = ''
|
||||
|
||||
# docs-code-segment:start main
|
||||
[[entrypoint]]
|
||||
id = 'main'
|
||||
name = 'Main'
|
||||
path = 'src/main.tsx'
|
||||
type = 'inline-view'
|
||||
description = ''
|
||||
# docs-code-segment:end
|
||||
|
||||
[permissions]
|
||||
main_search_bar = ["read"]
|
||||
|
||||
17
example_plugins/plugins/ui_inline_code_block/package.json
Normal file
17
example_plugins/plugins/ui_inline_code_block/package.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "@project-gauntlet/docs-inline-code-block",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "gauntlet build",
|
||||
"dev": "gauntlet dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"@project-gauntlet/api": "file:../../js/api"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/deno": "*",
|
||||
"@project-gauntlet/tools": "*",
|
||||
"typescript": "*"
|
||||
}
|
||||
}
|
||||
19
example_plugins/plugins/ui_inline_code_block/src/main.tsx
Normal file
19
example_plugins/plugins/ui_inline_code_block/src/main.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { ReactElement } from "react";
|
||||
import { Inline } from "@project-gauntlet/api/components";
|
||||
|
||||
export default function Main({ text }: { text: string }): ReactElement | null {
|
||||
|
||||
if (text != "example") {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Inline>
|
||||
<Inline.Center>
|
||||
<Inline.Center.CodeBlock>
|
||||
{"() => void"}
|
||||
</Inline.Center.CodeBlock>
|
||||
</Inline.Center>
|
||||
</Inline>
|
||||
)
|
||||
}
|
||||
11
example_plugins/plugins/ui_inline_code_block/tsconfig.json
Normal file
11
example_plugins/plugins/ui_inline_code_block/tsconfig.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"module": "ES2022",
|
||||
"esModuleInterop": true,
|
||||
"target": "ES2022",
|
||||
"moduleResolution": "bundler",
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"lib": ["ES2020"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue