Skip to content

Commit 7a2eb4d

Browse files
authored
Merge pull request #3 from CreoWis/tailwindcss-support
Tailwindcss support
2 parents 7baed09 + 2a24308 commit 7a2eb4d

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,16 @@
22

33
A simple hook to compare two texts and provide you the diff and the matching percentages
44

5+
## To Use Components
6+
7+
```js
8+
import 'text-compare/dist/style.css';
9+
import { Compare } from "text-compare";
10+
11+
export const CompareText = () => {
12+
return(
13+
<Compare/>
14+
)
15+
}
16+
```
17+

lib/components/Compare.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Compare = () => {
2+
return <h1 className="bg-red-300 text-red-900">Compare</h1>;
3+
};
4+
5+
export default Compare;

lib/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

lib/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
import "./index.css";
3+
24
import { useTextComparison } from "./hooks/useTextComparison";
5+
import Compare from "./components/Compare";
36

4-
export { useTextComparison };
7+
export { useTextComparison, Compare };

0 commit comments

Comments
 (0)