Skip to content

Highlight JavaScript and maybe TypeScript. I've never tried. I uh... should probably test...

Notifications You must be signed in to change notification settings

im-lonely/react-js-highlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

react-js-highlight

Zero dependency package for highlighting JavaScript and possibly TypeScript^

Download the code here or install the package

npm install --save react-js-highlight
yarn add react-js-highlight

Usage

import React from "react";
import useHighlight from "react-js-highlight";

const App = () => {
  return (
    <div className="App">
      {useHighlight('console.log("hello world")', {
        normalColor: "#idkidk",
        stringColor: "#idkidk",
        classColor: "#idkidk",
        keywordColor: "#idkidk",
        varColor: "#idkidk",
        propertyColor: "#idkidk",
      })}
    </div>
  );
};

Warning! This code is so trash it might not work!

^I did not test TypeScript since I am lazy


About

Highlight JavaScript and maybe TypeScript. I've never tried. I uh... should probably test...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages