UNPKG

@redocly/asyncapi-docs

Version:

Async API docs for Redocly Realm

31 lines (30 loc) 998 B
import{jsx as o,jsxs as c}from"react/jsx-runtime";import e from"styled-components";import{Tag as l}from"@redocly/theme";const v=({icon:r,info:a,children:i,capitalize:t,className:s,onClick:n})=>c(d,{className:s,onClick:n,children:[r&&o(p,{children:r}),o(h,{borderless:!0,capitalize:t,children:i}),a&&o(g,{children:a})]}),d=e.div` display: flex; gap: var(--spacing-xxs); `,p=e.div` width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; display: flex; flex-shrink: 0; background-color: var(--layer-color-hover); `,h=e(l)` text-transform: ${({capitalize:r})=>r?"capitalize":"initial"}; margin: 0; background-color: var(--layer-color-hover); color: inherit; & span { font-weight: 600; } `,g=e.div` width: 24px; height: 24px; border-radius: var(--border-radius); align-items: center; justify-content: center; background-color: var(--layer-color-hover); display: flex; cursor: pointer; `;export{v as TagWithIcon};