0.1.1 • Published 1 year ago

docusaurus-theme-ts-playground v0.1.1

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

1 year ago

0.1.0

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago