Skip to content

Commit

Permalink
Merge pull request #29 from podium-lib/add_jsx_attribute_methods
Browse files Browse the repository at this point in the history
docs: add .toJsxAttributes() methods
  • Loading branch information
wkillerud authored May 23, 2024
2 parents debc5aa + 7c6412b commit d7174e7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/api/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,14 @@ An `AssetCSS` instance has the following methods:

Returns a JSON representation of the `AssetCSS` instance.

### .toJsxAttributes()

Returns a JSON representation of the `AssetCSS` instance ready for use in a JSX link tag

```jsx
<link {...css.toJsxAttributes()} />
```

### .toHTML()

Returns an HTML `<link>` element as a string representation of the `AssetCSS`
Expand Down Expand Up @@ -472,6 +480,14 @@ An `AssetJS` instance has the following methods:

Returns a JSON representation of the `AssetJS` instance.

### .toJsxAttributes()

Returns a JSON representation of the `AssetJS` instance ready for use in a JSX script tag.

```jsx
<script {...js.toJsxAttributes()}></script>
```

### .toHTML()

Returns an HTML `<script>` element as a string representation of the `AssetJS`
Expand Down

0 comments on commit d7174e7

Please sign in to comment.