@acentswap/aceswap-uikit 中文文档教程
AceSwap UIkit
AceSwap UIkit 是一组 React 组件和挂钩,用于在 AceSwap 的应用程序上构建页面。 它还包含一个用于暗模式和亮模式的主题文件。
Install
yarn add @apeswapfinance/uikit
Setup
Theme
在使用AceSwap UIkit 之前,您需要将主题文件提供给styled-component。
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@apeswapfinance/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
Reset
重置 CSS 可用作全局样式组件。
import { ResetCSS } from '@apeswapfinance/uikit'
...
<ResetCSS />
Types
该项目使用 Typescript 构建并导出所有相关类型。
AceSwap UIkit
AceSwap UIkit is a set of React components and hooks used to build pages on AceSwap's apps. It also contains a theme file for dark and light mode.
Install
yarn add @apeswapfinance/uikit
Setup
Theme
Before using AceSwap UIkit, you need to provide the theme file to styled-component.
import { ThemeProvider } from 'styled-components'
import { light, dark } from '@apeswapfinance/uikit'
...
<ThemeProvider theme={isDark}>...</ThemeProvider>
Reset
A reset CSS is available as a global styled component.
import { ResetCSS } from '@apeswapfinance/uikit'
...
<ResetCSS />
Types
This project is built with Typescript and export all the relevant types.