@ant-design-rescript/components
v0.0.9
Published
ReScript bindings for antd
Downloads
3
Maintainers
Readme
@ant-design-rescript/components
ReScript bindings for antd
Getting Started
- Add this to your
package.json
:
yarn add @ant-design-rescript/components
- 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>
}