@explorer02/api-playground
TypeScript icon, indicating that this package has built-in type declarations

1.0.19 • Public • Published

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 and src/styles/tailwind.scss using VSCode live SASS compiler
  • execute yarn build

License

ISC Licensed. Copyright (c) @explorer02 2023.

Package Sidebar

Install

npm i @explorer02/api-playground

Weekly Downloads

1

Version

1.0.19

License

ISC

Unpacked Size

409 kB

Total Files

306

Last publish

Collaborators

  • explorer02