API Summary
API Summary
Some description.
Read More
Category A
Category B
Overview​
This componenent is a display themed with a custom color palette. It contains clickable links that redirect to SwaggerHub and other articles on the DOCS site.
Details​
| Criteria | Component Meets Criteria |
|---|---|
| Has hover styles | Yes |
| Has light and dark mode | Yes |
| Has brand theming | No |
Component Props​
| Prop Name | Type | Description |
|---|---|---|
| title | string | The title appearing in the component header |
| description | string | The text appearing before endpoint and item sections |
| endpoints | object | An array of objects, where each object contains an array of endpoints and a category name |
Example Code​
import SummaryAPI from '@site/src/elements/doc/SummaryAPI';
<SummaryAPI
title={'API Summary'}
description={'Some description.'}
endpoints={[
{
category: 'Category A',
items: [
{
endpoint: '/',
method: 'get',
title: 'Some Endpoint',
},
],
},
{
category: 'Category B',
items: [
{
endpoint: '/',
method: 'post',
title: 'Other Endpoint',
},
{
endpoint: '/',
method: 'delete',
title: 'Another Endpoint',
},
],
},
]}
moreInfo={'./'}
/>