Spectacle-code-slide 介绍
Spectacle-code-slide是一个用JavaScript开发的滑动代码块。Spectacle-code-slide目前的代码风格:
安装:
$ npm install --save spectacle-code-slide
使用:
import CodeSlide from 'spectacle-code-slide'; export default class Presentation extends React.Component { render() { return ( <Spectacle theme={theme}> <Deck transition={[]} transitionDuration={0} progress="bar"> // ... <CodeSlide transition={[]} lang="js" code={require("raw!../assets/code.example")} ranges={[ { loc: [0, 270], title: "Walking through some code" }, { loc: [0, 1], title: "The Beginning" }, { loc: [1, 2] }, { loc: [1, 2], note: "Heres a note!" }, { loc: [2, 3] }, { loc: [4, 7] }, { loc: [8, 10] }, // ... ]}/> // ... </Deck> </Spectacle> ); } }
Spectacle-code-slide 官网
https://github.com/thejameskyle/spectacle-code-slide
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。