@cn-ui/highlight
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

@cn-ui/highlight

A Code Highlight Component base on SolidJS

pnpm i @cn-ui/highlight highlight.js solid-js @cn-ui/use
// recommend to use
import 'highlight.js/styles/github-dark.css';
import { Code, lowlight } from '@cn-ui/highlight';
// lowlight is a syntax transformer!
// https://www.npmjs.com/package/lowlight

export default (props) => {
    return (
        <div>
            <Code lang="ts" code={'// TS code'}></Code>
        </div>
    );
};

Package Sidebar

Install

npm i @cn-ui/highlight

Weekly Downloads

11

Version

2.2.0

License

MIT

Unpacked Size

13.8 kB

Total Files

10

Last publish

Collaborators

  • konghayao