Skip to content

Commit

Permalink
doc: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 15, 2022
1 parent 877cd16 commit 2d9098f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,27 @@ CDN: [UNPKG](https://unpkg.com/@wcj/dark-mode/dist/) | [jsDelivr](https://cdn.js

There are two ways how you can use `<dark-mode>`:


```html
<dark-mode></dark-mode>
<dark-mode light="Dart" dark="Light"></dark-mode>
<dark-mode dark="Dark" light="Light" style="border: 1px solid red; font-size: 12px;"></dark-mode>
```

Use in [React](https://github.com/facebook/react):

```jsx
import React from 'react';
import '@wcj/dark-mode';

function Demo() {
return (
<div>
<dark-mode light="Dart" dark="Light"></dark-mode>
</div>
);
}
```

## Contributors

As always, thanks to our amazing contributors!
Expand Down

0 comments on commit 2d9098f

Please sign in to comment.