Skip to content

Commit

Permalink
add stylesheet action example
Browse files Browse the repository at this point in the history
  • Loading branch information
josefaidt committed Jan 23, 2022
1 parent 937a829 commit 3e73cc0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,27 @@ Described below is the pattern used for accessing `theme` context to create your
</style>
```

### use:stylesheet

```svelte
<script>
import { stylesheet } from 'svelte-themer/use'
export let myTheme = {
text: 'red',
}
</script>
<div use:stylesheet="{myTheme}">
<p>Hello, World!</p>
</div>
<style>
p {
color: var(--text);
}
</style>
```

## Contributing

Refer to the [contributing guidelines](CONTRIBUTING.md).
Expand Down

1 comment on commit 3e73cc0

@vercel
Copy link

@vercel vercel bot commented on 3e73cc0 Jan 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.