Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Don't require the use of "less"
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmurphy committed Sep 11, 2019
1 parent ee93ca0 commit e1a83c6
Show file tree
Hide file tree
Showing 54 changed files with 23,059 additions and 77 deletions.
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,9 @@ yarn add bs-ant-design-alt
```

* Add `bs-ant-design-alt` to `bs-dependencies` in `bsconfig.json`.
* You also need to set up your bundler to handle less files (This is a requirement from ant-design)

For webpack, you can do this:

```
npm install --save-dev less@^2.7.3 less-loader css-loader style-loader
```

(`less@^2.7.3` is the important bit)

Now add this to your webpack config:

```js
// webpack.config.js
module.exports = {
...
module: {
rules: [{
test: /\.less$/,
use: ["style-loader", "css-loader", "less-loader"]
}]
}
};
```
**THIS LIBRARY ONLY INCLUDES THE BINDINGS FOR ANT DESIGN, NOT THE STYLE**.
You'll have to include the Ant Design CSS in your project yourself. We've included the compiled and minified CSS that Ant Design publishes to CDN JS in this file for your convenience. It's in the "vendor" directory. You can require that using a bundler, if you like. Or you can load the CSS on your html page from the CDN directly! Just make sure the version you load correlates with the version of ant-design that this package uses.

## Usage

Expand Down
1 change: 0 additions & 1 deletion src/Antd_Affix.re
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
onChange Callback for when affix state is changed Function(affixed) -
*/

[%bs.raw {|require("antd/lib/affix/style")|}];
[@bs.module] [@react.component]
external make:
(
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Alert.re
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
type Type of Alert styles, options: success, info, warning, error string info, in banner mode default is warning
onClose Callback when Alert is closed (e: MouseEvent) => void -
*/
[%bs.raw {|require("antd/lib/alert/style")|}];

[@bs.deriving jsConverter]
type alertType = [ | `success | `info | `warning | `error];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_AutoComplete.re
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ let boolOrFn = (type a, boolOrFn: filterOption(a)): a =>
| Function(v) => v
};

[%bs.raw {|require("antd/lib/auto-complete/style")|}];

[@bs.module]
external reactComponent: React.component('a) = "antd/lib/auto-complete";
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Avatar.re
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
alt This attribute defines the alternative text describing the image string -
onError handler when img load error?return false to prevent default fallback behavior () => boolean -
*/
[%bs.raw {|require("antd/lib/avatar/style")|}];
module IconName = Antd_IconName;

[@bs.deriving jsConverter]
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Badge.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
text If status is set, text sets the display text of the status dot string ''
title Text to show when hovering over the badge string count
*/
[%bs.raw {|require("antd/lib/badge/style")|}];

[@bs.deriving jsConverter]
type status = [ | `success | `processing | `default | `error | `warning];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Breadcrumb.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/breadcrumb/style")|}];

type route = {
.
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Button.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module IconName = Antd_IconName;

[%bs.raw {|require("antd/lib/button/style")|}];

[@bs.deriving jsConverter]
type buttonType = [
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Calendar.re
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
onSelect Callback for when a date is selected function(date: moment? -
onChange Callback for when date changes function(date: moment? -
*/
[%bs.raw {|require("antd/lib/calendar/style")|}];
module Locale = Antd_DatePicker.Locale;

[@bs.deriving jsConverter]
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Card.re
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
type Card style type, can be set to inner or not set string -
onTabChange Callback when tab is switched (key) => void -
*/
[%bs.raw {|require("antd/lib/card/style")|}];
type tab = {
.
"key": string,
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Carousel.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/carousel/style")|}];

[@bs.deriving jsConverter]
type effect = [ | `scrollx | `fade];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Cascader.re
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
// onChange callback when finishing cascader select (value, selectedOptions) => void -
// onPopupVisibleChange callback when popup shown or hidden (value) => void -

[%bs.raw {|require("antd/lib/cascader/style")|}];

[@bs.deriving jsConverter]
type trigger = [ | `click | `hover];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Checkbox.re
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
indeterminate indeterminate checked state of checkbox boolean false
onChange The callback function that is triggered when the state changes. Function(e:Event)
*/
[%bs.raw {|require("antd/lib/checkbox/style")|}];
[@bs.module] [@react.component]
external make:
(
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Collapse.re
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
key Unique key identifying the panel from among its siblings string -
showArrow If false, panel will not show arrow icon boolean true
*/
[%bs.raw {|require("antd/lib/collapse/style")|}];

type panelProps = {
.
Expand Down
2 changes: 0 additions & 2 deletions src/Antd_DatePicker.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/date-picker/style")|}];

[@bs.deriving jsConverter]
type rangePickerMode = [ | `time | `date | `month | `year | `decade];
Expand Down Expand Up @@ -259,7 +258,6 @@ module WeekPicker = {
/*
[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/date-picker";
[%bs.raw {|require("antd/lib/date-picker/style")|}];
COMMON
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Divider.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/divider/style")|}];
[@bs.deriving jsConverter]
type dividerType = [ | `horizontal | `vertical];

Expand Down
1 change: 0 additions & 1 deletion src/Antd_Drawer.re
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// onClose Specify a callback that will be called when a user clicks mask, close button or Cancel button. function(e) -
// afterVisibleChange Callback after the animation ends when switching drawers. function(visible) -

[%bs.raw {|require("antd/lib/drawer/style")|}];

[@bs.deriving jsConverter]
type placement = [ | `top | `right | `bottom | `left];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Dropdown.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
visible whether the dropdown menu is visible boolean -
onVisibleChange a callback function takes an argument: visible, is executed when the visible state is changed Function(visible)
*/
[%bs.raw {|require("antd/lib/dropdown/style")|}];

module Menu = Antd_Menu;
module IconName = Antd_IconName;
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Empty.re
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// imageStyle style of image CSSProperties -
// image Customize image. Will tread as image url when string provided. string | ReactNode Empty.PRESENTED_IMAGE_DEFAULT

[%bs.raw {|require("antd/lib/empty/style")|}];

[@bs.obj]
external makePropsEmpty:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Form.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/form/style")|}];

[@bs.deriving jsConverter]
type formLayout = [ | `horizontal | `inline | `vertical];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Grid.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/grid/style")|}];

module Row = {
[@bs.deriving jsConverter]
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Input.re
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
onPressEnter The callback function that is triggered when Enter key is pressed. function(e)
*/
[%bs.raw {|require("antd/lib/input/style")|}];

[@bs.deriving jsConverter]
type size = [ | `large | `default | `small];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_InputFloat.re
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
value current value number
onChange The callback triggered when the value is changed. function(value: number | string)
*/
[%bs.raw {|require("antd/lib/input-number/style")|}];

[@bs.module] [@react.component]
external make:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_InputNumber.re
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
value current value number
onChange The callback triggered when the value is changed. function(value: number | string)
*/
[%bs.raw {|require("antd/lib/input-number/style")|}];

[@bs.module] [@react.component]
external make:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Layout.re
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* last checked v3.10 */
[%bs.raw {|require("antd/lib/layout/style")|}];

[@bs.obj]
external makePropsLayout:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_List.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/list/style")|}];

[@bs.deriving jsConverter]
type position = [ | `top | `bottom | `both];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_LocaleProvider.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/locale-provider/style")|}];

module Locale = {
module Table = {
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Menu.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/menu/style")|}];

[@bs.deriving jsConverter]
type theme = [ | `light | `dark];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Message.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[@bs.module "antd/lib/message"] [@react.component]
external message: React.element = "default";
[%bs.raw {|require("antd/lib/message/style")|}];
type content = React.element;
type duration = int;
type options;
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Modal.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/modal/style")|}];

/*
afterClose Specify a function that will be called when modal is closed completely. function -
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Notification.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
notification.destroy()
*/

[%bs.raw {|require("antd/lib/notification/style")|}];

type stringOrNode;
[@bs.deriving abstract]
Expand Down
1 change: 0 additions & 1 deletion src/Antd_PageHeader.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// footer PageHeader's footer, generally used to render TabBar ReactNode -
// onBack back icon click event ()=>void ()=>history.back()

[%bs.raw {|require("antd/lib/page-header/style")|}];

let breadcrumbConfig = routes => {"routes": routes};

Expand Down
1 change: 0 additions & 1 deletion src/Antd_Pagination.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/pagination/style")|}];

[@bs.obj]
external makePropsPagination:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Popconfirm.re
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
onConfirm callback of confirmation function(e) -
icon customize icon of confirmation ReactNode <Icon type="exclamation-circle" />
*/
[%bs.raw {|require("antd/lib/popconfirm/style")|}];

[@bs.deriving jsConverter]
type placementType = [
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Popover.re
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
title Title of the card string|ReactNode -
*/

[%bs.raw {|require("antd/lib/popover/style")|}];

[@bs.deriving jsConverter]
type placementType = [
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Progress.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
successPercent segmented success percent number 0
*/

[%bs.raw {|require("antd/lib/progress/style")|}];

[@bs.deriving jsConverter]
type mode = [ | `line | `dashboard | `circle];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Radio.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/radio/style")|}];

[@bs.obj]
external makePropsRadio:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Rate.re
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
onKeyDown callback when keydown on component Function(event)
*/

[%bs.raw {|require("antd/lib/rate/style")|}];
[@bs.obj]
external makePropsRate:
(
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Select.re
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
open Controlled open state of dropdown boolean -
onDropdownVisibleChange Call when dropdown open function(open) -
*/
[%bs.raw {|require("antd/lib/select/style")|}];

[@bs.deriving jsConverter]
type mode = [ | `default | `multiple | `tags];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Skeleton.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/skeleton/style")|}];

/*
size Set the size of avatar Enum{ 'large', 'small', 'default' } -
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Spin.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/spin/style")|}];

[@bs.deriving jsConverter]
type size = [ | `default | `small | `large];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Statistic.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// value Display value string | number -
// valueStyle Set value css style style -

[%bs.raw {|require("antd/lib/statistic/style")|}];

[@bs.obj]
external makePropsStatistic:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Steps.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/steps";

[%bs.raw {|require("antd/lib/steps/style")|}];

[@bs.deriving jsConverter]
type status = [ | `wait | `process | `finish | `error];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Switch.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
unCheckedChildren content to be shown when the state is unchecked string|ReactNode
onChange a callback function, can be executed when the checked state is changing Function(checked:Boolean)
*/
[%bs.raw {|require("antd/lib/switch/style")|}];

[@bs.deriving jsConverter]
type size = [ | `default | `small];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Table.re
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
}
*/

[%bs.raw {|require("antd/lib/table/style")|}];

[@bs.deriving jsConverter]
type sizeType = [ | `default | `middle | `small];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Tabs.re
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
</Tabs>
*/

[%bs.raw {|require("antd/lib/tabs/style")|}];

[@bs.obj]
external makePropsTabs:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Tag.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/tag/style")|}];

/*
afterClose Callback executed when close animation is completed () => void -
Expand Down
2 changes: 0 additions & 2 deletions src/Antd_TimePicker.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/time-picker/style")|}];

type moment = MomentRe.Moment.t;

Expand Down Expand Up @@ -117,7 +116,6 @@ let make =
/*
[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/time-picker";
[%bs.raw {|require("antd/lib/time-picker/style")|}];
[@bs.obj]
external makeProps:
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Timeline.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/timeline";

[%bs.raw {|require("antd/lib/timeline/style")|}];

[@bs.deriving jsConverter]
type modeType = [ | `left | `alternate | `right];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Tooltip.re
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
title Title of the card string|ReactNode -
*/

[%bs.raw {|require("antd/lib/tooltip/style")|}];

[@bs.deriving jsConverter]
type placementType = [
Expand Down
1 change: 0 additions & 1 deletion src/Antd_TreeSelect.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {|require("antd/lib/tree-select/style")|}];

[@bs.deriving jsConverter]
type size = [ | `large | `default | `small];
Expand Down
1 change: 0 additions & 1 deletion src/Antd_Typography.re
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[%bs.raw {| require("antd/lib/typography/style")|}];

[@bs.deriving jsConverter]
type contentType = [ | `secondary | `warning | `danger];
Expand Down
Loading

0 comments on commit e1a83c6

Please sign in to comment.