@redocly/graphql-docs
Version:
Redocly GraphQL docs
17 lines (16 loc) • 1.1 kB
JavaScript
import{jsx as o,jsxs as g}from"react/jsx-runtime";import{forwardRef as f}from"react";import{Feedback as b,FEEDBACK_TYPES as x}from"@redocly/theme";import{useLocation as h}from"react-router-dom";import{useSettings as v}from"../../settings/index.js";import{getNavigationIdProp as E}from"../hooks/utils.js";import{OVERVIEW_ITEM_NAME as u}from"../../definition/index.js";import{styled as r}from"../../styled-components.js";const P=f(({path:t,children:e,name:a},i)=>{const n=v(),s=h().pathname,{hide:c,type:d,settings:p}=n.feedback||{},l=d||x.SENTIMENT,m=c!==!0&&t!=="/"&&a!==u;return g(y,{ref:i,...E(t),children:[e,m&&o(k,{children:o(b,{type:l,settings:p,path:I(s)})})]})}),y=r.div`
padding-top: var(--spacing-xxl);
padding-bottom: var(--spacing-xl);
border-bottom: 1px solid var(--border-color-secondary);
&:first-child {
padding-top: calc(var(--spacing-xl) + 8px);
}
&:last-child {
border-bottom: none;
}
`,k=r.div`
padding-top: var(--spacing-vertical);
padding-right: var(--spacing-horizontal);
width: 100%;
display: flex;
`;function I(t){return`${t}`}export{P as Item};