Skip to content

Commit fd7213d

Browse files
committed
fix packages again and fixed callouts (close enough)
1 parent 95b9591 commit fd7213d

5 files changed

Lines changed: 301 additions & 11 deletions

File tree

components/Callout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export default function Callout({ icon = 'idea', variant = 'default', children }
2727

2828
return (
2929
<div className={`miniwiki-callout my-4 flex items-start gap-3 rounded-lg border px-4 py-3 shadow-sm ${colorClass}`}>
30-
<span className={`mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center leading-none ${iconColorClass}`}>
30+
<span className={`mt-3 inline-flex h-5 w-5 shrink-0 items-center justify-center leading-none ${iconColorClass}`}>
3131
<Icon name={icon} size={18} />
3232
</span>
33-
<div className="min-w-0 text-sm leading-6 [&>p:first-child]:mt-0 [&>p:last-child]:mb-0">{children}</div>
33+
<div className="min-w-0 text-sm leading-6 [&_p]:m-0">{children}</div>
3434
</div>
3535
);
3636
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"remark-gfm": "^4.0.1"
3737
},
3838
"devDependencies": {
39+
"@tailwindcss/postcss": "^4.1.16",
3940
"@types/react": "^19.2.2",
4041
"@tailwindcss/typography": "^0.5.19",
4142
"autoprefixer": "^10.4.27",

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
plugins: {
3-
tailwindcss: {},
3+
'@tailwindcss/postcss': {},
44
autoprefixer: {},
55
},
66
};

styles/globals.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";
42

53
html,
64
body,
@@ -32,6 +30,14 @@ a:not(.miniwiki-button) {
3230
@apply opacity-60;
3331
}
3432

33+
.miniwiki-callout > :where(p) {
34+
margin: 0;
35+
}
36+
37+
.miniwiki-callout > :where(p + p) {
38+
margin-top: 0.75rem;
39+
}
40+
3541
.mdx-content h1,
3642
.mdx-content h2,
3743
.mdx-content h3,

0 commit comments

Comments
 (0)