0.1.22 • Published 3 years ago
react-code-ray v0.1.22
react-code-ray
.
Hi guys! This is my first NPM package, so I hope you will enjoy it. Other day, I as googling something and I noticed that all code on some of these website are the same, plain boring backgroud with some syntaxt highlighting. So I wrote package that can show you beautiful code, I took design from ray.so and converted it into NPM package. Test it out on: react-code-ray.amelislamovic.tech
Instalation
yarn add react-code-ray
or
npm install react-code-ray
Usage
import { RayCode } from "react-code-ray";
const code = `const a = 5 + 10;
console.log(a)`;
export default function App() {
return (
<div>
<RayCode code={code} language="ts" >
</div>
);
}
Options
title | title of code | string |
---|---|---|
language | language in which code is written | string |
padding | padding that will be inside of our component | number |
code | code that will actually be inside of our component | string |
className | className that will be applied to parent element | string |
0.1.22
3 years ago
0.1.21
3 years ago
0.1.20
3 years ago
0.1.19
3 years ago
0.1.18
3 years ago
0.1.16
3 years ago
0.1.15
3 years ago
0.1.14
3 years ago
0.1.13
3 years ago
0.1.12
3 years ago
0.1.11
3 years ago
0.1.10
3 years ago
0.1.9
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago