Skip to content

Commit

Permalink
Update Tailwind CSS typography
Browse files Browse the repository at this point in the history
  • Loading branch information
fuma-nama committed Sep 10, 2023
1 parent 83f3777 commit abc71a1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/next-docs-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"react-dom": "18.x"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"@tailwindcss/typography": "^0.5.10",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.1",
"autoprefixer": "10.4.15",
Expand Down
16 changes: 7 additions & 9 deletions packages/next-docs-ui/src/components/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ export const Accordion = forwardRef<
)}
{...props}
>
<div className="nd-not-prose">
<AccordionPrimitive.Header>
<AccordionPrimitive.Trigger className="nd-flex nd-w-full nd-items-center nd-justify-between nd-p-4 nd-text-sm nd-font-medium [&[data-state=open]>svg]:nd-rotate-180">
{title}
<ChevronDown className="nd-h-4 nd-w-4 nd-transition-transform nd-duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
</div>
<AccordionPrimitive.Header className="nd-not-prose">
<AccordionPrimitive.Trigger className="nd-flex nd-w-full nd-items-center nd-justify-between nd-p-4 nd-text-sm nd-font-medium [&[data-state=open]>svg]:nd-rotate-180">
{title}
<ChevronDown className="nd-h-4 nd-w-4 nd-transition-transform nd-duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
<AccordionPrimitive.Content className="nd-px-4 nd-overflow-hidden nd-text-sm data-[state=closed]:nd-animate-accordion-up data-[state=open]:nd-animate-accordion-down">
<div className="nd-pb-4 nd-pt-0">{children}</div>
<div className="nd-pb-4">{children}</div>
</AccordionPrimitive.Content>
</AccordionPrimitive.Item>
))
Expand Down
12 changes: 7 additions & 5 deletions packages/next-docs-ui/src/components/mdx/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ export function Heading<T extends Types = 'h1'>({
return (
<As {...props} className={clsx('nd-group nd-scroll-m-20', props.className)}>
{props.children}
<div className="nd-not-prose nd-opacity-0 nd-inline nd-font-normal nd-ml-2 nd-transition-opacity nd-text-muted-foreground group-hover:nd-opacity-100">
<a href={`#${props.id}`} aria-label="Link to section">
#
</a>
</div>
<a
href={`#${props.id}`}
aria-label="Link to section"
className="nd-not-prose nd-opacity-0 nd-font-normal nd-ml-2 nd-transition-opacity nd-text-muted-foreground group-hover:nd-opacity-100"
>
#
</a>
</As>
)
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit abc71a1

Please sign in to comment.