Skip to content

Commit

Permalink
add overview to docs and link to it from every docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
dcastil committed May 21, 2023
1 parent 4ea7caa commit 504ab60
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 1 deletion.
34 changes: 34 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<div align="center">
<br />
<a href="https://github.com/dcastil/tailwind-merge">
<img src="../assets/logo.svg" alt="tailwind-merge" height="150px" />
</a>
</div>

# tailwind-merge

Utility function to efficiently merge [Tailwind CSS](https://tailwindcss.com) classes in JS without style conflicts.

```ts
import { twMerge } from 'tailwind-merge'

twMerge('px-2 py-1 bg-red hover:bg-dark-red', 'p-3 bg-[#B91C1C]')
// → 'hover:bg-dark-red p-3 bg-[#B91C1C]'
```

- Supports Tailwind v3.0 up to v3.3 (if you use Tailwind v2, use [tailwind-merge v0.9.0](https://github.com/dcastil/tailwind-merge/tree/v0.9.0))
- Works in all modern browsers and Node >=12
- Fully typed
- [Check bundle size on Bundlephobia](https://bundlephobia.com/package/tailwind-merge)

## Get started

- [What is it for](./what-is-it-for.md)
- [Features](./features.md)
- [Configuration](./configuration.md)
- [Recipes](./recipes.md)
- [API reference](./api-reference.md)
- [Writing plugins](./writing-plugins.md)
- [Versioning](./versioning.md)
- [Contributing](./contributing.md)
- [Similar packages](./similar-packages.md)
2 changes: 2 additions & 0 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,5 @@ TypeScript type for config object. Useful if you want to build a `createConfig`
Next: [Writing plugins](./writing-plugins.md)

Previous: [Recipes](./recipes.md)

[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,5 @@ const twMerge3 = createTailwindMerge(() => ({ … }), withMagic, withMoreMagic)
Next: [Recipes](./recipes.md)

Previous: [Features](./features.md)

[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ Please see [CONTRIBUTING](../.github/CONTRIBUTING.md) for details.
Next: [Similar packages](./similar-packages.md)

Previous: [Versioning](./versioning.md)

[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@ The initial computations are called lazily on the first call to `twMerge` to pre
Next: [Configuration](./configuration.md)

Previous: [What is it for](./what-is-it-for.md)

[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ function customTwMerge(...inputs) {
Next: [API reference](./api-reference.md)

Previous: [Configuration](./configuration.md)

[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/similar-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
---

Previous: [Contributing](./contributing.md)

[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ This package follows the [SemVer](https://semver.org) versioning rules. More spe
Next: [Contributing](./contributing.md)

Previous: [Writing plugins](./writing-plugins.md)

[Back to overview](./README.md)
2 changes: 1 addition & 1 deletion docs/what-is-it-for.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ tailwind-merge overrides conflicting classes and keeps everything else untouched

Next: [Features](./features.md)

Previous: [Overview](../README.md)
[Back to overview](./README.md)
2 changes: 2 additions & 0 deletions docs/writing-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ Also, feel free to check out [tailwind-merge-rtl-plugin](https://www.npmjs.com/p
Next: [Versioning](./versioning.md)

Previous: [API reference](./api-reference.md)

[Back to overview](./README.md)

0 comments on commit 504ab60

Please sign in to comment.