@quietmind/mdx-docs 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -0
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -188,6 +188,66 @@ export default defineConfig(
|
|
|
188
188
|
</html>
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
+
## Theming
|
|
192
|
+
|
|
193
|
+
Pass a `theme` option to `createApp` to customize your site's colors and typography. All existing `createApp({ pages, site })` calls continue to work unchanged.
|
|
194
|
+
|
|
195
|
+
### Simple
|
|
196
|
+
|
|
197
|
+
Set a brand color and/or font family:
|
|
198
|
+
|
|
199
|
+
```js
|
|
200
|
+
createApp({
|
|
201
|
+
pages,
|
|
202
|
+
site,
|
|
203
|
+
theme: {
|
|
204
|
+
primaryColor: "#6200ea",
|
|
205
|
+
fontFamily: '"Inter", sans-serif',
|
|
206
|
+
},
|
|
207
|
+
});
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Presets
|
|
211
|
+
|
|
212
|
+
Import a built-in color preset for a quick start:
|
|
213
|
+
|
|
214
|
+
```js
|
|
215
|
+
import { createApp, themes } from "@quietmind/mdx-docs";
|
|
216
|
+
|
|
217
|
+
createApp({ pages, site, theme: themes.ocean });
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Available presets: `themes.ocean`, `themes.forest`, `themes.rose`.
|
|
221
|
+
|
|
222
|
+
Presets can be extended:
|
|
223
|
+
|
|
224
|
+
```js
|
|
225
|
+
createApp({ pages, site, theme: { ...themes.ocean, fontFamily: '"Inter", sans-serif' } });
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Advanced
|
|
229
|
+
|
|
230
|
+
Use `light` and `dark` keys for full per-mode [MUI theme](https://mui.com/material-ui/customization/theming/) overrides. These are deep-merged into the built-in palette, so you only need to specify what you want to change:
|
|
231
|
+
|
|
232
|
+
```js
|
|
233
|
+
createApp({
|
|
234
|
+
pages,
|
|
235
|
+
site,
|
|
236
|
+
theme: {
|
|
237
|
+
primaryColor: "#6200ea",
|
|
238
|
+
light: {
|
|
239
|
+
palette: { background: { default: "#f0f4f8" } },
|
|
240
|
+
},
|
|
241
|
+
dark: {
|
|
242
|
+
palette: { primary: { main: "#bb86fc" } },
|
|
243
|
+
typography: { fontFamily: '"Inter", sans-serif' },
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Mode-specific overrides take precedence over `primaryColor` and `fontFamily` shorthands.
|
|
250
|
+
|
|
191
251
|
## Tech Stack
|
|
192
252
|
|
|
193
253
|
- React 19, Material-UI 7, Emotion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quietmind/mdx-docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://mdxdocs.com",
|
|
6
6
|
"exports": {
|
|
@@ -77,6 +77,5 @@
|
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
|
-
}
|
|
81
|
-
"packageManager": "yarn@4.13.0+sha512.5c20ba010c99815433e5c8453112165e673f1c7948d8d2b267f4b5e52097538658388ebc9f9580656d9b75c5cc996f990f611f99304a2197d4c56d21eea370e7"
|
|
80
|
+
}
|
|
82
81
|
}
|