docs: compact the API Reference links (#21285)

This PR is opinionated. 
Issue: the `API Reference` sections in the examples hold too much
vertical space and make us scroll the page too much. See an
[example](https://python.langchain.com/docs/get_started/quickstart/#conversation-retrieval-chain).
These sections are **important**. So, the compacting should not make
these sections less noticeable.
Change: compacting the `API Reference` sections. See the [same example
after change
applied](https://langchain-j6nya46lf-langchain.vercel.app/docs/get_started/quickstart/#conversation-retrieval-chain).
It is more compact and now looks like references (footnotes).
Note: I would also change the section style, so it would be more
noticeable (maybe to look like the footnotes. Smaller wider font?)

---------

Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
pull/22088/head^2
Leonid Ganeline 4 months ago committed by GitHub
parent 0ea1e89b2c
commit 2416737c5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -16,18 +16,14 @@ function Imports({ imports }) {
borderBottomRightRadius: "var(--ifm-code-border-radius)",
}}
>
<h4 style={{ paddingLeft: "0.65rem", marginBottom: "0.45rem" }}>
<b style={{ paddingLeft: "0.65rem", marginBottom: "0.45rem", marginRight: "0.5rem" }}>
API Reference:
</h4>
<ul style={{ paddingBottom: "1rem" }}>
{imports.map(({ imported, source, docs }) => (
<li key={imported}>
<a href={docs}>
<span>{imported}</span>
</a>
</li>
</b>
{imports.map(({ imported, source, docs }, index) => (
<span key={imported}>
<a href={docs}>{imported}</a>{index < imports.length - 1 ? ' | ' : ''}
</span>
))}
</ul>
</div>
);
}

Loading…
Cancel
Save