@ewtd/ewt-code

1.0.3 • Public • Published

USAGE

Install

$ npm i @ewtd/ewt

demo

import { Code } from '@ewtd/ewt';

...

<Code
  sourceCode={'console.log(\'hello world\');'}
>
 I'am demo here
<Code>

API

参数 说明 类型 默认值
children 需要展示的 demo 内容 any null
sourceCode 需要展示的源代码 any ''
mode 模式[default inline codeOnly markdown](模式为 markdown 时,参数同 markdown-to-jsx) string default
buttonText 按钮文案 any '查看源码'
className 增加额外的class string ''
style 自定义样式 object {}
prefixCls 样式名前缀 string ewt-code

Package Sidebar

Install

npm i @ewtd/ewt-code

Weekly Downloads

5

Version

1.0.3

License

MIT

Unpacked Size

879 kB

Total Files

13

Last publish

Collaborators

  • tangbei
  • fansolc
  • glynodejs
  • iceydu
  • koshi
  • yukap
  • jiaguishan
  • yangfenglin