251 |
252 |
257 |
258 |
259 | {metaBreadcrumbs || ""}
260 |
280 |
281 | {iconGrids}
282 |
283 | *Information about license is provided for informational
284 | purposes only, in the best effort manner. Always check the official
285 | source before using the icons.
286 |
287 |
288 | );
289 | }
290 |
291 | export default App;
292 |
--------------------------------------------------------------------------------
/src/ControlsBar.css:
--------------------------------------------------------------------------------
1 | .controls-bar {
2 | display: flex;
3 | align-items: center;
4 | gap: 0.5rem;
5 |
6 | min-height: 30px;
7 | padding: var(--spacing-4) 0;
8 | }
9 |
10 | .controls-bar.grow-first > :first-child {
11 | flex-grow: 1;
12 | }
13 |
14 | .controls-bar.sticky.top {
15 | position: sticky;
16 | top: 0;
17 | }
18 |
19 | .controls-bar.sticky.bottom {
20 | position: fixed;
21 | bottom: 0;
22 |
23 | width: 100%;
24 | }
25 |
26 | [data-theme="dark"] .controls-bar {
27 | background-color: var(--db-primary);
28 | }
29 |
30 | [data-theme="light"] .controls-bar {
31 | background-color: var(--lb-primary);
32 | }
33 |
--------------------------------------------------------------------------------
/src/ControlsBar.tsx:
--------------------------------------------------------------------------------
1 | import { ReactNode } from "react";
2 | import "./ControlsBar.css";
3 |
4 | type ControlsBar = {
5 | children: ReactNode;
6 | stickTo?: "top" | "bottom";
7 | growFirstItem?: boolean;
8 | };
9 |
10 | export default function ControlsBar({
11 | children,
12 | stickTo,
13 | growFirstItem,
14 | }: ControlsBar) {
15 | const className = [
16 | "controls-bar",
17 | (stickTo && `sticky ${stickTo}`) || "",
18 | (growFirstItem && "grow-first") || "",
19 | ]
20 | .filter(Boolean)
21 | .join(" ");
22 |
23 | return