Skip to content

Commit 8571f13

Browse files
committed
docs: add docs
1 parent 9b1c986 commit 8571f13

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
# svelte-inline-css
1+
# svelte-inline-css
2+
3+
Easy to use inline style system like [Vue.js inline style](https://v3.vuejs.org/guide/class-and-style.html#binding-inline-styles) in Svelte(Use [use:action](https://svelte.dev/docs#use_action))
4+
5+
# Installation
6+
7+
```
8+
yarn add svelte-inline-css
9+
```
10+
11+
# Usage
12+
13+
```svelte
14+
<script lang="ts">
15+
import style from './style';
16+
export let height: `${number}px` = '0px';
17+
</script>
18+
19+
<div use:style={{ height }} />
20+
<div use:style={{ color: 'red' }}>red</div>
21+
```

0 commit comments

Comments
 (0)