Skip to content

Commit

Permalink
feat: more readable types
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Dec 18, 2024
1 parent 189fe8b commit f2c375e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/Doc/DocEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const DocEntry = component$(({ data, parent }: Props) => {
<article
id={`${parentText}${data.name}`}
class={cn("gal-1 text-fira flex flex-col", {
"p-2": parent,
"py-2 pl-4": parent,
})}>
<h1
class={cn({
Expand Down
4 changes: 1 addition & 3 deletions src/components/Doc/JSDoc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ export const JSDoc = component$(({ data }: Props) => {
const paramTag = tags.find((tag) => tag.tag === "param");
const otherTags = tags.filter((tag) => tag.tag !== "param");

console.log(otherTags, paramTag);

return (
<>
{typeof jsDoc.doc === "object" ? (
<JSDocDescription data={data} />
) : (
jsDoc.doc
<p class="pb-2">{jsDoc.doc}</p>
)}
{paramTag &&
paramTag.items.map((item, i) => (
Expand Down
14 changes: 9 additions & 5 deletions src/components/Doc/TypeMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ export const TypeMembers = component$(({ data }: Props) => {

return membersData.map((memberData: any, i: number) => {
return (
<DocEntry
data={memberData}
parent={`${parentName}`}
key={`${parentName}-${member}-${i}`}
/>
<>
<DocEntry
data={memberData}
parent={`${parentName}`}
key={`${parentName}-${member}-${i}`}
/>

<div class="divider pl-4" />
</>
);
});
})}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Util/CarbonAd.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { onlyClassic = false, preferStart = false } = Astro.props;
---

<div
class="2xl:justify-star 2sm:min-h-[12.5rem] bottom-0 right-0 z-50 flex h-auto min-h-[18rem] items-center justify-center p-6 md:p-4 2xl:fixed"
class="2xl:justify-star bottom-0 right-0 z-50 flex h-auto min-h-[18rem] items-center justify-center p-6 2sm:min-h-[12.5rem] md:p-4 2xl:fixed"
class:list={{
"md:justify-start": preferStart,
}}>
Expand All @@ -28,7 +28,6 @@ const { onlyClassic = false, preferStart = false } = Astro.props;
// @ts-ignore
if (node.id === "carbonads") {
const ads = document.querySelectorAll("#carbonads");
console.log(ads);
if (ads.length > 1) {
ads[1].remove();
}
Expand Down
6 changes: 3 additions & 3 deletions src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ body {
cursor: url(/cursor_default.png), auto;
}

.btn {
.btn:hover {
cursor: url(/cursor_pointer.png), auto;
}

a {
a:hover {
cursor: url(/cursor_pointer.png), auto;
}

.hoverable {
.hoverable:hover {
cursor: url(/cursor_pointer.png), auto;
}

Expand Down

0 comments on commit f2c375e

Please sign in to comment.