Skip to content

Commit 35e623a

Browse files
committed
docs: Some cleanup on the docs
1 parent 98098c0 commit 35e623a

File tree

4 files changed

+61
-16
lines changed

4 files changed

+61
-16
lines changed

docs/docs/Exports/create-loader.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ A `Loader` takes ownership over...
4444
- Data-loading
4545
- Data-transformation
4646
- Fetch-state rendering
47+
48+
:::caution Using version `0.3.51` or earlier?
49+
Please refer to the [**migration guide**](../Migrations/v0.x).
50+
:::

docs/docs/intro.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ slug: /
55

66
# RTK Query Loader
77

8-
![npm](https://img.shields.io/npm/v/@ryfylke-react/rtk-query-loader?color=gray&style=flat-square)
9-
![npm type definitions](https://img.shields.io/npm/types/@ryfylke-react/rtk-query-loader?color=gray&label=%20&logoColor=gray)
10-
![npm bundle size](https://img.shields.io/bundlephobia/min/@ryfylke-react/rtk-query-loader@latest?style=flat-square)
11-
![npm downloads](https://img.shields.io/npm/dm/@ryfylke-react/rtk-query-loader)
12-
[![github stars](https://img.shields.io/github/stars/ryfylke-react-as/rtk-query-loader?style=social)](https://github.com/ryfylke-react-as/rtk-query-loader)
13-
148
Lets you create loaders for use with [RTK Query](https://redux-toolkit.js.org/rtk-query/overview).
159

1610
- [x] **Reusable**
@@ -22,14 +16,10 @@ Lets you create loaders for use with [RTK Query](https://redux-toolkit.js.org/rt
2216
npm i @ryfylke-react/rtk-query-loader
2317
```
2418

25-
- [Github](https://github.com/ryfylke-react-as/rtk-query-loader)
26-
- [NPM](https://www.npmjs.com/package/@ryfylke-react/rtk-query-loader)
27-
- [CodeSandbox](https://codesandbox.io/s/rtk-query-loader-demo-42tubp) (demo/playground)
19+
:::caution These docs are for version 1.0.0 and up
20+
If you are using version `0.3.51` or earlier, please refer to the [**migration guide**](./Migrations/v0.x).
21+
:::
2822

2923
:::tip Getting Started
3024
Get started with our recommended best practises by following the [**Quick guide**](/Quick%20guide).
3125
:::
32-
33-
:::danger These docs are for version 1.0.0 and up
34-
If you are using version `0.3.51` or earlier, please refer to the [**migration guide**](./Migrations/v0.x).
35-
:::

docs/docusaurus.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,21 @@ const config = {
6666
},
6767
items: [
6868
{
69-
href: "https://github.com/ryfylke-react-as/rtk-query-loader",
70-
label: "GitHub",
69+
href: "https://codesandbox.io/s/rtk-query-loader-1-0-0-demo-forked-du3936?file=/src/loaders/pokemonLoader.tsx",
70+
label: "Demo",
7171
position: "right",
7272
},
7373
{
7474
href: "https://www.npmjs.com/package/@ryfylke-react/rtk-query-loader",
7575
label: "NPM",
7676
position: "right",
77+
className: "icon-npm",
78+
},
79+
{
80+
href: "https://github.com/ryfylke-react-as/rtk-query-loader",
81+
label: "GitHub",
82+
position: "right",
83+
className: "icon-github",
7784
},
7885
],
7986
},

docs/src/css/custom.css

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919

2020
/* For readability concerns, you should choose a lighter palette in dark mode. */
21-
[data-theme='dark'] {
21+
[data-theme="dark"] {
2222
--ifm-color-primary: #25c2a0;
2323
--ifm-color-primary-dark: #21af90;
2424
--ifm-color-primary-darker: #1fa588;
@@ -28,3 +28,47 @@
2828
--ifm-color-primary-lightest: #4fddbf;
2929
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
3030
}
31+
32+
.icon-npm {
33+
display: flex;
34+
align-items: center;
35+
gap: 0.5rem;
36+
font-size: 0px;
37+
}
38+
.icon-npm svg {
39+
display: none;
40+
}
41+
.icon-npm::after {
42+
background-image: url("https://img.shields.io/npm/v/@ryfylke-react/rtk-query-loader?color=gray&style=flat-square");
43+
width: 88px;
44+
height: 20px;
45+
content: "";
46+
display: flex;
47+
border: 1px solid transparent;
48+
}
49+
.icon-npm:hover::after,
50+
.icon-npm:focus::after {
51+
border: 1px solid currentColor;
52+
}
53+
54+
.icon-github {
55+
display: flex;
56+
align-items: center;
57+
gap: 0.5rem;
58+
font-size: 0px;
59+
}
60+
.icon-github svg {
61+
display: none;
62+
}
63+
.icon-github::after {
64+
background-image: url("https://img.shields.io/github/stars/ryfylke-react-as/rtk-query-loader?style=social");
65+
width: 82px;
66+
height: 20px;
67+
content: "";
68+
transition: transform 0.1s ease-in-out;
69+
display: flex;
70+
}
71+
.icon-github:hover::after,
72+
.icon-github:focus::after {
73+
transform: scale(1.05);
74+
}

0 commit comments

Comments
 (0)