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