1.0.0 • Published 2 years ago

school-recruit v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

school-recruit

校招展示组件

安装

yarn

yarn add school-recruit

npm

npm i school-recruit

使用

只展示

/**
 * 只渲染
 */
import React, { useCallback } from 'react';
import { render } from 'react-dom';
import SchoolRecruit from 'school-recruit'
//import SchoolRecruit from '../../src/Renderer';
//import  SRComponent  from 'srcomponent';
const App: React.FC = () => {
  let testData1 = {title: 'xxx', content: 'xxxxxxx', buttonText: 'xxxx'}
  let testData2 = {title: 'yyy', content: 'yyyyyyyy',  buttonText: 'yyyy'}
  let testData3 = [{...testData1}, {...testData1}, {...testData1}, {...testData2}, {...testData2}]

  return (
    <div>
      <SchoolRecruit {...testData3}/>
    </div>
  );
  
};

render(<App />, document.querySelector('#app'));

API

参数说明类型
title卡片的标题Str
content卡片的内容Str(支持hmtl字符串)
buttonText按钮的内容Str