@tenphi/cookbook 0.11.2 → 0.12.0
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 +17 -0
- package/dist/styling.d.ts +3 -0
- package/dist/styling.js +3 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -8,3 +8,20 @@ import cookbook from "@tenphi/cookbook";
|
|
|
8
8
|
|
|
9
9
|
export default defineConfig({ integrations: [cookbook()] });
|
|
10
10
|
```
|
|
11
|
+
|
|
12
|
+
Build custom Astro or MDX components with Cookbook's configured styling runtime:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { defineComponent } from "@tenphi/cookbook/styling";
|
|
16
|
+
|
|
17
|
+
export const ProjectBadge = defineComponent("ProjectBadge", {
|
|
18
|
+
as: "span",
|
|
19
|
+
styles: { padding: "1x", color: "#accent-text", preset: "small" },
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Customize this component's root through `theme.styles.ProjectBadge`; it has no
|
|
24
|
+
named sub-elements. The `/styling` entry point also exports `tasty`, `useGlobalStyles`,
|
|
25
|
+
`resolveComponentStyles`, `mergeStyles`, and the `Styles` type. Cookbook extracts
|
|
26
|
+
the CSS automatically. See [Theme and components](https://cookbook.tenphi.me/theme-and-components/)
|
|
27
|
+
for a complete custom logo and site title example.
|
package/dist/styling.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"./components": {
|
|
22
22
|
"types": "./dist/components.d.ts",
|
|
23
23
|
"import": "./dist/components.js"
|
|
24
|
+
},
|
|
25
|
+
"./styling": {
|
|
26
|
+
"types": "./dist/styling.d.ts",
|
|
27
|
+
"import": "./dist/styling.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"files": [
|
|
@@ -46,8 +50,8 @@
|
|
|
46
50
|
"author": "Andrey Yamanov",
|
|
47
51
|
"license": "MIT",
|
|
48
52
|
"dependencies": {
|
|
49
|
-
"@tenphi/docs": "0.
|
|
50
|
-
"@tenphi/starlight": "0.
|
|
53
|
+
"@tenphi/docs": "0.12.0",
|
|
54
|
+
"@tenphi/starlight": "0.12.0",
|
|
51
55
|
"jiti": "^2.6.1"
|
|
52
56
|
},
|
|
53
57
|
"peerDependencies": {
|