open-index/open-npm huggingface dataset:
npm package: @shengkang/yaml-editor
Description: ## Getting Started
Latest version: 1.0.0

# dumi-test

## Getting Started

Install dependencies,

```bash
$ npm i
```

Start the dev server,

```bash
$ npm start
```

Build documentation,

```bash
$ npm run docs:build
```

Run test,

```bash
$ npm test
```

Build library via `father`,

```bash
$ npm run build
```
npm package: @shenglong/use-localstorage
Description: Use localStorage with react hook
Author: Shenglong Yu
Latest version: 1.0.0

# use-localstorage

A Hook for persisting state into localStorage.

## Install

``` sh
$ npm install --save @shenglong/use-localstorage
```

Or with Yarn

``` sh
$ yarn add @shenglong/use-localstorage
```

## Usage

```javascript
import useLocalStorage from "@shenglong/use-localstorage"

function App() {
  const [name, setName] = useLocalStorage('name', 'Bob');

  return (
    <input
      type="text"
      placeholder="Enter your name"
      value={name}
      onChange={e => setName(e.target.value)}
    />
  )
}
```
npm package: @shenglong/use-tailwind-theme
Description: A Hook for changing dark mode in Tailwind CSS
Author: Shenglong Yu
Latest version: 1.0.0

# use-tailwind-theme

A Hook for changing dark mode in Tailwind CSS.

## Install

``` sh
$ npm install --save @shenglong/use-tailwind-theme
```

Or with Yarn

``` sh
$ yarn add @shenglong/use-tailwind-theme
```

## Usage

```tsx
import useTheme from "@shenglong/use-tailwind-theme";

function App() {
  const { theme, changeTheme } = useTheme();

  return (
    <div>
      <div>{ theme }</div>
      <button onClick={() => changeTheme()}>change theme</button>
    <div>
  )
}
```

## API

```typescript
const { theme, changeTheme } = useTheme(options?: Partial<{
  key: string;
  defaultTheme: "light" | "dark";
}>);
```

## Params

| Property      | Description            | Type | Default |
|---------------|------------------------|------|---------|
| options       | optional initial value | Partial<{key: string; defaultTheme: "light" \| "dark";}>  | {key: "theme"; defaultTheme: "light"}       |


## Tailwind CSS config

You need to use the `class` strategy for this hook. The config you should set is on the below.

```javascript
// tailwind.config.js
module.exports = {
  darkMode: "class",
  // ...
}
```
[Read more details ](https://tailwindcss.com/docs/dark-mode).