PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / admin / faq-builder / utils / FaqLoader.js

FaqLoader.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/admin/faq-builder/utils/FaqLoader.js

29 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from "react";
2
3 // Card-style skeleton matching the FAQ list rows. Renders roughly as many rows
4 // as the group actually has (`count`) so the accordion opens straight to ~its
5 // final height — otherwise a large group animates open to a fixed 3-row
6 // skeleton and then jumps when the taller real list swaps in. Capped at 10 so
7 // it never overshoots the body's ~575px scroll area.
8 const FaqLoader = ({ count }) => {
9 const rows = Math.min(Math.max(Number(count) || 3, 1), 10);
10 return (
11 <div className="bd-faq-skeleton bd-faq-skeleton--faq">
12 {Array.from({ length: rows }).map((_, i) => (
13 <div className="bd-faq-skeleton__card" key={i}>
14 <span className="bd-faq-skeleton__grip" />
15 <span className="bd-faq-skeleton__text">
16 <span className="bd-faq-skeleton__line bd-faq-skeleton__line--title" />
17 </span>
18 <span className="bd-faq-skeleton__toggle" />
19 <span className="bd-faq-skeleton__icon" />
20 <span className="bd-faq-skeleton__icon" />
21 <span className="bd-faq-skeleton__icon" />
22 </div>
23 ))}
24 </div>
25 );
26 };
27
28 export default FaqLoader;
29