@stefanlazarevic/components.code-block
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

CodeBlock

npm i @stefanlazarevic/components.code-block
yarn add @stefanlazarevic/component.code-block

Коришћење

import CodeBlock from "@stefanlazarevic/component.code-block";

<CodeBlock>{"const x = 10;"}</CodeBlock>;

API

назив тип подразумевана вредност опис
content string undefined 📘
className string undefined 📘
language string undefined 📘
showLines boolean undefined 📘
style object undefined 📘
testid string undefined 📘
id string undefined 📘

Стилизација

Пример стилова који се могу копирати у пројекат.

:root {
  --hljs-background-color: #222634;
  --hljs-color: #bdbdbf;
  --hljs-keyword: #cca5f7;
  --hljs-string: #88d61f;
  --hljs-number: #efb28c;
  --hljs-function: #82b1ff;
  --hljs-attr: #efb28c;
  --hljs-tag: #8bd9fd;
  --hljs-name: #db7978;
  --hljs-built_in: #db7978;
  --hljs-comment: #9e9e9e;
}

Списак свих подржаних језика можете пронаћи на highlight.js/SUPPORTED_LANGUAGES

Readme

Keywords

none

Package Sidebar

Install

npm i @stefanlazarevic/components.code-block

Weekly Downloads

2

Version

0.0.5

License

ISC

Unpacked Size

21.4 kB

Total Files

9

Last publish

Collaborators

  • stefan.lazarevic