Skip to content

ant-design-rescript/components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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>
}

About

The ReScript bindings for antd

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published