1.0.3 • Published 4 years ago
@ewtd/ewt-code v1.0.3
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 |