@yak-spirit/yak-swap-ui
Version:
A reusable React component for swapping with Yield Yak Router. The YY Router can be found [here](https://github.com/yieldyak/yak-aggregator).
23 lines (22 loc) • 958 B
JavaScript
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { tokenList } from './api/tokenList.js';
import { SwapCard } from './components/swap/SwapCard/index.js';
import { ToastContainer } from 'react-toastify';
/**
* A`Swap` component that can be embedded into applications. To use,
* one should install all prerequisite libraries and setup
* For example,
*
* ```javascript
* <YakSwap />
* ```
*
* All of the complexity of communicating with the YY Router and managing
* its data is handled internally by the component.
*
* For information on other properties like earning referrals, see the
* [[SwapProps]] documentation.
*/
export default function YakSwap(props) {
return (_jsxs(_Fragment, { children: [_jsx(SwapCard, { ...props, tokenList: props.tokenList ?? tokenList, showUsdPrices: props.showUsdPrices ?? true }, void 0), _jsx(ToastContainer, { position: "bottom-right" }, void 0)] }, void 0));
}