You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
This project adheres to [Semantic Versioning](http://semver.org/). Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/airbnb/react-sketchapp/releases) page.
4
4
5
+
## Version 3.0.1
6
+
7
+
- Allow passing a style object when making a symbol
8
+
- Expose `getSymbolMasterByName`
9
+
5
10
## Version 3.0.0
6
11
7
12
- Export Svg components in the Svg/index.js file (Thanks @saschazar21!)
Copy file name to clipboardExpand all lines: docs/API.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -625,7 +625,7 @@ Reset the registered styles.
625
625
626
626
An interface to Sketch's symbols. Create symbols and optionally inject them into the symbols page.
627
627
628
-
### `makeSymbol(node, name, document)`
628
+
### `makeSymbol(node, props, document)`
629
629
630
630
Creates a new symbol and injects it into the `Symbols` page. The name of the symbol can be optionally provided and will default to the display name of the component.
631
631
@@ -636,12 +636,18 @@ Returns a react component which is an can be used to render instances of the sym
636
636
| Parameter | Type | Default | Note |
637
637
| --- | --- | --- | --- |
638
638
|`node`|`Node`|| The node object that will be rendered as a symbol |
639
-
|`name`|`String`| The node name | Optional name for the symbol, string can include backslashes to organize these symbols with Sketch. For example `squares/blue`|
639
+
|`props`|`Object`| The node name | Optional name for the symbol, string can include backslashes to organize these symbols with Sketch. For example `squares/blue`|
640
+
|`props.name`|`String`| The node name | Optional name for the symbol, string can include backslashes to organize these symbols with Sketch. For example `squares/blue`|
641
+
|`props.style`|[`Style`](/docs/styling.md)|||
640
642
|`document`|`Object`| The current document | The Sketch document to make the symbol in |
641
643
642
644
### `getSymbolComponentByName(name)`
643
645
644
-
Returns a react component which can be used to render the symbol that is associated with that name.
646
+
Returns a react component which can be used to render the symbol instance that is associated with that name.
647
+
648
+
### `getSymbolMasterByName(name)`
649
+
650
+
Returns the JSON representation of the symbol master that is associated with that name.
0 commit comments