Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ewtd/ewt-code

yukap15MIT1.0.3

An ewt component

react, react-component, ewt

readme

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