@ant-design-rescript/components

0.0.7 • Public • Published

@ant-design-rescript/components

ReScript bindings for antd

Getting Started

  1. Add this to your package.json:
yarn add @ant-design-rescript/components
  1. Add this to your rescript.json
"bs-dependencies": [
  "@rescript/react",
  "@ant-design-rescript/components",
]

Example Usage

Button

open AntDesignRescriptComponents.Components

@react.component
let make = () => {
  <Button loading={Button.BoolOrObject.object({delay: 1.})}>
    {"Cancel"->React.string}
  </Button>
}

with @ant-design/icons

yarn add @ant-design-rescript/icons

bsconfig.json

"bs-dependencies": [
  "@rescript/react",
  "@ant-design-rescript/components",
  "@ant-design-rescript/icons"
]
open AntDesignRescriptIcons.Icons
open AntDesignRescriptComponents.Components

@react.component
let make = () => {
  <Button type_=#primary icon={<Outlined.Upload />}>
    {"Upload"->React.string}
  </Button>
}

Locale

open AntDesignRescriptComponents.Locales

@react.component
let make = () => {
  <ConfigProvider locale={zh_CN}>
    <App />
  </ConfigProvider>
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.7
    0
    • latest

Version History

Package Sidebar

Install

npm i @ant-design-rescript/components

Weekly Downloads

0

Version

0.0.7

License

MIT

Unpacked Size

20.2 kB

Total Files

7

Last publish

Collaborators

  • limit-liu