@skip-go/widget 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -117,6 +117,8 @@ interface SwapWidgetProps {
117
117
  }
118
118
  ````
119
119
 
120
+ # Experimental features (still in development)
121
+
120
122
  ## Web Component usage
121
123
 
122
124
  The web component is created with the `@r2wc/react-to-web-component` library.
@@ -131,29 +133,35 @@ initializeSwapWidget();
131
133
 
132
134
  et voilà! you can now use the `swap-widget` web-component as `<swap-widget></swap-widget>`
133
135
 
134
- The props for the web component are the same as `SwapWidgetProps` except that
135
- they are sent to the web-component as attributes in kebab-case as strings or stringified objects ie.
136
+ The props for the web component are the same as `SwapWidgetProps` except that all props
137
+ are passed to the web-component via attributes in kebab-case as strings or stringified objects ie.
136
138
 
137
139
  ```tsx
138
- interface SwapWidgetProps {
139
- colors
140
- defaultRoute
141
- routeConfig
140
+ <SwapWidget
141
+ className="test-class"
142
+ onlyTestnet={true}
143
+ colors={{
144
+ primary: '#FF4FFF',
145
+ }}
146
+ defaultRoute={{
147
+ srcChainID: 'osmosis-1',
148
+ srcAssetDenom:
149
+ 'ibc/1480b8fd20ad5fcae81ea87584d269547dd4d436843c1d20f15e00eb64743ef4',
150
+ }}
151
+ />
142
152
  ```
143
153
 
144
154
  becomes
145
155
 
146
156
  ```tsx
147
157
  <swap-widget
148
- class-name="classname"
158
+ class-name="test-class"
159
+ onlyTestnet="true"
149
160
  colors='{"primary":"#FF4FFF"}'
150
161
  default-route={JSON.stringify({
151
162
  srcChainID: 'osmosis-1',
152
163
  srcAssetDenom:
153
164
  'ibc/1480b8fd20ad5fcae81ea87584d269547dd4d436843c1d20f15e00eb64743ef4',
154
165
  })}
155
- toaster-props=""
156
- endpoint-options=""
157
- api-url=""
158
166
  ></swap-widget>
159
167
  ```
package/build/index.es.js CHANGED
@@ -5180,8 +5180,7 @@ const WidgetWithProvider = (props) => {
5180
5180
  : value;
5181
5181
  return accumulator;
5182
5182
  }, {});
5183
- const { toasterProps, endpointOptions, apiURL, ...swapWidgetProps } = realProps;
5184
- return (jsx(SwapWidgetProvider, { toasterProps: toasterProps, endpointOptions: endpointOptions, apiURL: apiURL, children: jsx(SwapWidget, { ...swapWidgetProps }) }));
5183
+ return jsx(SwapWidget, { ...realProps });
5185
5184
  };
5186
5185
  const WEB_COMPONENT_NAME = 'skip-widget';
5187
5186
  let initialized = false;