mirror of
https://github.com/nix-community/noogle.git
synced 2025-01-08 09:42:18 +03:00
chore: imroved mobile readability
This commit is contained in:
parent
33b63889fc
commit
52b00c52a9
@ -48,7 +48,7 @@ export default function FunctionItem(props: FunctionItemProps) {
|
||||
return s.split(" ").filter(Boolean).slice(0, 10).join(" ");
|
||||
};
|
||||
if (typeof description === "object") {
|
||||
const singleString = description.join("");
|
||||
const singleString = description?.join("") || "";
|
||||
return getFirstWords(singleString);
|
||||
} else if (description) {
|
||||
return getFirstWords(description);
|
||||
@ -84,7 +84,7 @@ export default function FunctionItem(props: FunctionItemProps) {
|
||||
cursor: !selected ? "pointer" : "default",
|
||||
display: "flex",
|
||||
justifyContent: "left",
|
||||
px: selected ? 0 : { xs: 0, md: 2 },
|
||||
px: selected ? 0 : { xs: 0.8, md: 2 },
|
||||
pt: 1,
|
||||
mb: 0,
|
||||
color: selected ? "primary.main" : undefined,
|
||||
|
@ -12,9 +12,9 @@ export type DocItem = {
|
||||
id: string;
|
||||
category: string;
|
||||
name: string;
|
||||
fn_type?: string;
|
||||
description?: string | string[];
|
||||
example?: string | string[];
|
||||
fn_type?: null | string;
|
||||
description?: null | string | string[];
|
||||
example?: null | string | string[];
|
||||
};
|
||||
|
||||
export type MetaData = DocItem[];
|
||||
|
Loading…
Reference in New Issue
Block a user