
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus setup. It's part of my efforts to simplify FreeSewing's setup so we can focus on our core value proposition.
23 lines
374 B
Text
23 lines
374 B
Text
---
|
|
title: Attributes.render()
|
|
---
|
|
|
|
The `Attributes.render()` method will render attributes as a string suitable
|
|
for inclusion in an SVG tag.
|
|
|
|
## Signature
|
|
|
|
```js
|
|
string attributes.render()
|
|
```
|
|
|
|
## Example
|
|
|
|
```js
|
|
const attr = new Attributes()
|
|
.set('id', 'example')
|
|
.add('class', 'classA')
|
|
.add('class', 'classb')
|
|
|
|
const paragraph = `<p ${attr.render()}>Hello</p>`
|
|
```
|