0.1.1 • Published 3 years ago

docusaurus-theme-ts-playground v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Docusaurus TS Playground

You can create link to "TS Playground" with a code block ts-button meta string.

Install

npm i docusaurus-theme-ts-playground # or yarn add docusaurus-theme-ts-playground

Modify your docusaurus.config.js

module.exports = {
  ...
+ themes: ['ts-playground'],
  presets: ['@docusaurus/preset-classic']
  ...
}

Example:

```jsx ts-button
function Clock(props) {
  const [date, setDate] = useState(new Date());
  useEffect(() => {
    var timerID = setInterval(() => tick(), 1000);

    return function cleanup() {
      clearInterval(timerID);
    };
  });

  function tick() {
    setDate(new Date());
  }

  return (
    <div>
      <h2>It is {date.toLocaleTimeString()}.</h2>
    </div>
  );
}
```
0.1.1

3 years ago

0.1.0

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago