@explorer02/api-playground
v1.0.19
Published
API Playground component
Downloads
57
Maintainers
Readme
API Playground
React Playground for API Routes A component to ease up hitting utility routes based on different templates
Best usecase is to open the component in a Modal
API
Component - APIPlayground
Props => config: TemplateConfig[]
TemplateConfig is a union type for different type of templates
| Template | Usecase | Options | | -------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Cache Viewer (CACHE_VIEWER) | View static data - Quickly peek into some environment configurations or user properties | - id(string) - unique id for template - title(string) - template title to be shown in sidenav - type(Template)- Template.STATIC_DATA - data(object|string) - JSON object or string to be shown - language(?Language) - Language of data (JSON, JAVASCRIPT), for syntax highlighting and formatting - readOnly(?boolean) - whether the content is editable or not | | | | | | | | |
How to build?
- compile
src/styles/root.scss
andsrc/styles/tailwind.scss
using VSCode live SASS compiler - execute
yarn build
License
ISC Licensed. Copyright (c) @explorer02 2023.