Skip to content

Commit

Permalink
resolves #2047, fix summary text in chikorita template, when in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Jan 12, 2025
1 parent d0a174d commit 6110440
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
12 changes: 3 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"css.validate": false,
"vitest.disableWorkspaceWarning": true,
"typescript.tsdk": "node_modules/typescript/lib",
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml",
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": [
"tools/compose/*"
]
},
"i18n-ally.localesPaths": ["apps/client/src/locales"],
"vitest.disableWorkspaceWarning": true
]
}
11 changes: 8 additions & 3 deletions apps/artboard/src/templates/chikorita.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ const Link = ({ url, icon, iconOnRight, label, className }: LinkProps) => {

return (
<div className="flex items-center gap-x-1.5">
{!iconOnRight && (icon ?? <i className="ph ph-bold ph-link text-primary" />)}
{!iconOnRight &&
(icon ?? <i className="ph ph-bold ph-link text-primary group-[.sidebar]:text-white" />)}
<a
href={url.href}
target="_blank"
Expand All @@ -137,7 +138,8 @@ const Link = ({ url, icon, iconOnRight, label, className }: LinkProps) => {
>
{label ?? (url.label || url.href)}
</a>
{iconOnRight && (icon ?? <i className="ph ph-bold ph-link text-primary" />)}
{iconOnRight &&
(icon ?? <i className="ph ph-bold ph-link text-primary group-[.sidebar]:text-white" />)}
</div>
);
};
Expand Down Expand Up @@ -208,7 +210,10 @@ const Section = <T,>({
</div>

{summary !== undefined && !isEmptyString(summary) && (
<div dangerouslySetInnerHTML={{ __html: summary }} className="wysiwyg" />
<div
dangerouslySetInnerHTML={{ __html: summary }}
className="wysiwyg group-[.sidebar]:prose-invert"
/>
)}

{level !== undefined && level > 0 && <Rating level={level} />}
Expand Down

0 comments on commit 6110440

Please sign in to comment.