0.1.1 • Published 2 years ago

docusaurus-theme-ts-playground v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.1.0

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago