Skip to content

Commit 7baed09

Browse files
committed
(fix) using inline style
1 parent 106e9bf commit 7baed09

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
*.tgz

lib/hooks/useTextComparison.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const useTextComparison = (text1: string, text2: string) => {
1515
if (word1 === word2) {
1616
// Words are the same, mark them as common (gray text)
1717
result.push(
18-
<span key={`common-${i}`} className="text-gray-300">
18+
<span key={`common-${i}`} style={{color: "gray"}}>
1919
{word1}
2020
</span>
2121
);
@@ -26,7 +26,7 @@ export const useTextComparison = (text1: string, text2: string) => {
2626
// Word in text1 is not in text2, mark as removed (red text)
2727
if (i < words1.length) {
2828
result.push(
29-
<span key={`removed-${i}`} className="text-red-500">
29+
<span key={`removed-${i}`} style={{color: "red"}}>
3030
{word1}
3131
</span>
3232
);
@@ -36,7 +36,7 @@ export const useTextComparison = (text1: string, text2: string) => {
3636
// Word in text2 is not in text1, mark as added (green text)
3737
if (j < words2.length) {
3838
result.push(
39-
<span key={`added-${j}`} className="text-green-500">
39+
<span key={`added-${j}`} style={{color: "green"}}>
4040
{word2}
4141
</span>
4242
);

0 commit comments

Comments
 (0)