From 7cf63f4b2b9972cc679c25902dda7876db9fb559 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 26 Apr 2019 18:30:04 +0200 Subject: [PATCH] Add Color module. --- .../src/apis/ActionSheetIOS.md | 2 +- .../src/apis/ActionSheetIOS.re | 2 +- reason-react-native/src/apis/Color.bs.js | 24 + reason-react-native/src/apis/Color.re | 446 ++++++++++++++++++ reason-react-native/src/apis/Style.re | 31 +- .../src/components/ActivityIndicator.md | 2 +- .../src/components/ActivityIndicator.re | 2 +- reason-react-native/src/components/Button.md | 2 +- reason-react-native/src/components/Button.re | 2 +- .../src/components/DrawerLayoutAndroid.md | 4 +- .../src/components/DrawerLayoutAndroid.re | 4 +- .../src/components/FlatList.md | 2 +- .../src/components/FlatList.re | 2 +- .../src/components/ImageBackground.md | 8 +- .../src/components/ImageBackground.re | 8 +- .../src/components/InputAccessoryView.md | 4 +- .../src/components/InputAccessoryView.re | 2 +- reason-react-native/src/components/Picker.md | 2 +- reason-react-native/src/components/Picker.re | 2 +- .../src/components/PickerIOS.md | 2 +- .../src/components/PickerIOS.re | 2 +- .../src/components/ProgressBarAndroid.md | 2 +- .../src/components/ProgressBarAndroid.re | 2 +- .../src/components/ProgressViewIOS.md | 4 +- .../src/components/ProgressViewIOS.re | 4 +- .../src/components/RefreshControl.md | 8 +- .../src/components/RefreshControl.re | 8 +- .../src/components/ScrollView.md | 2 +- .../src/components/ScrollView.re | 2 +- .../src/components/SectionList.md | 2 +- .../src/components/SectionList.re | 2 +- reason-react-native/src/components/Slider.md | 6 +- reason-react-native/src/components/Slider.re | 6 +- reason-react-native/src/components/Switch.md | 10 +- reason-react-native/src/components/Switch.re | 8 +- .../src/components/TabBarIOS.md | 8 +- .../src/components/TabBarIOS.re | 8 +- .../src/components/TextInput.md | 6 +- .../src/components/TextInput.re | 6 +- .../src/components/ToolbarAndroid.md | 4 +- .../src/components/ToolbarAndroid.re | 4 +- .../src/components/VirtualizedList.md | 2 +- .../src/components/VirtualizedList.re | 2 +- .../src/components/VirtualizedSectionList.md | 2 +- .../src/components/VirtualizedSectionList.re | 2 +- website/src/components/Container.re | 2 +- website/src/components/HeaderLarge.re | 10 +- website/src/components/Homepage.re | 16 +- website/src/components/PageContent.re | 14 +- website/src/components/Sidebar.re | 7 +- 50 files changed, 588 insertions(+), 126 deletions(-) create mode 100644 reason-react-native/src/apis/Color.bs.js create mode 100644 reason-react-native/src/apis/Color.re diff --git a/reason-react-native/src/apis/ActionSheetIOS.md b/reason-react-native/src/apis/ActionSheetIOS.md index 459142cac..4e714ba7e 100644 --- a/reason-react-native/src/apis/ActionSheetIOS.md +++ b/reason-react-native/src/apis/ActionSheetIOS.md @@ -14,7 +14,7 @@ external options: ~destructiveButtonIndex: int=?, ~title: string=?, ~message: string=?, - ~tintColor: Style.color=?, + ~tintColor: Color.t=?, unit ) => options = diff --git a/reason-react-native/src/apis/ActionSheetIOS.re b/reason-react-native/src/apis/ActionSheetIOS.re index d89d49634..0991021ee 100644 --- a/reason-react-native/src/apis/ActionSheetIOS.re +++ b/reason-react-native/src/apis/ActionSheetIOS.re @@ -7,7 +7,7 @@ external options: ~destructiveButtonIndex: int=?, ~title: string=?, ~message: string=?, - ~tintColor: Style.color=?, + ~tintColor: Color.t=?, unit ) => options = diff --git a/reason-react-native/src/apis/Color.bs.js b/reason-react-native/src/apis/Color.bs.js new file mode 100644 index 000000000..455c76f0a --- /dev/null +++ b/reason-react-native/src/apis/Color.bs.js @@ -0,0 +1,24 @@ +'use strict'; + + +function rgb(r, g, b) { + return "rgb(" + (String(r) + (", " + (String(g) + (", " + (String(b) + ")"))))); +} + +function rgba(r, g, b, a) { + return "rgba(" + (String(r) + (", " + (String(g) + (", " + (String(b) + (", " + (String(a) + ")"))))))); +} + +function hsl(h, s, l) { + return "hsl(" + (String(h) + (", " + (String(s) + ("%, " + (String(l) + "%)"))))); +} + +function hsla(h, s, l, a) { + return "hsl(" + (String(h) + (", " + (String(s) + ("%, " + (String(l) + ("%, " + (String(a) + ")"))))))); +} + +exports.rgb = rgb; +exports.rgba = rgba; +exports.hsl = hsl; +exports.hsla = hsla; +/* No side effect */ diff --git a/reason-react-native/src/apis/Color.re b/reason-react-native/src/apis/Color.re new file mode 100644 index 000000000..1465cc73f --- /dev/null +++ b/reason-react-native/src/apis/Color.re @@ -0,0 +1,446 @@ +type t = string; + +let rgb = (~r: int, ~g: int, ~b: int) => {j|rgb($r, $g, $b)|j}; +let rgba = (~r: int, ~g: int, ~b: int, ~a: float) => {j|rgba($r, $g, $b, $a)|j}; + +let hsl = (~h: float, ~s: float, ~l: float) => {j|hsl($h, $s%, $l%)|j}; +let hsla = (~h: float, ~s: float, ~l: float, ~a: float) => {j|hsl($h, $s%, $l%, $a)|j}; + +[@bs.inline] +let transparent = "transparent"; + +// Pre-defined colors +[@bs.inline] +let aliceblue = "aliceblue"; + +[@bs.inline] +let antiquewhite = "antiquewhite"; + +[@bs.inline] +let aqua = "aqua"; + +[@bs.inline] +let aquamarine = "aquamarine"; + +[@bs.inline] +let azure = "azure"; + +[@bs.inline] +let beige = "beige"; + +[@bs.inline] +let bisque = "bisque"; + +[@bs.inline] +let black = "black"; + +[@bs.inline] +let blanchedalmond = "blanchedalmond"; + +[@bs.inline] +let blue = "blue"; + +[@bs.inline] +let blueviolet = "blueviolet"; + +[@bs.inline] +let brown = "brown"; + +[@bs.inline] +let burlywood = "burlywood"; + +[@bs.inline] +let cadetblue = "cadetblue"; + +[@bs.inline] +let chartreuse = "chartreuse"; + +[@bs.inline] +let chocolate = "chocolate"; + +[@bs.inline] +let coral = "coral"; + +[@bs.inline] +let cornflowerblue = "cornflowerblue"; + +[@bs.inline] +let cornsilk = "cornsilk"; + +[@bs.inline] +let crimson = "crimson"; + +[@bs.inline] +let cyan = "cyan"; + +[@bs.inline] +let darkblue = "darkblue"; + +[@bs.inline] +let darkcyan = "darkcyan"; + +[@bs.inline] +let darkgoldenrod = "darkgoldenrod"; + +[@bs.inline] +let darkgray = "darkgray"; + +[@bs.inline] +let darkgreen = "darkgreen"; + +[@bs.inline] +let darkgrey = "darkgrey"; + +[@bs.inline] +let darkkhaki = "darkkhaki"; + +[@bs.inline] +let darkmagenta = "darkmagenta"; + +[@bs.inline] +let darkolivegreen = "darkolivegreen"; + +[@bs.inline] +let darkorange = "darkorange"; + +[@bs.inline] +let darkorchid = "darkorchid"; + +[@bs.inline] +let darkred = "darkred"; + +[@bs.inline] +let darksalmon = "darksalmon"; + +[@bs.inline] +let darkseagreen = "darkseagreen"; + +[@bs.inline] +let darkslateblue = "darkslateblue"; + +[@bs.inline] +let darkslategrey = "darkslategrey"; + +[@bs.inline] +let darkturquoise = "darkturquoise"; + +[@bs.inline] +let darkviolet = "darkviolet"; + +[@bs.inline] +let deeppink = "deeppink"; + +[@bs.inline] +let deepskyblue = "deepskyblue"; + +[@bs.inline] +let dimgray = "dimgray"; + +[@bs.inline] +let dimgrey = "dimgrey"; + +[@bs.inline] +let dodgerblue = "dodgerblue"; + +[@bs.inline] +let firebrick = "firebrick"; + +[@bs.inline] +let floralwhite = "floralwhite"; + +[@bs.inline] +let forestgreen = "forestgreen"; + +[@bs.inline] +let fuchsia = "fuchsia"; + +[@bs.inline] +let gainsboro = "gainsboro"; + +[@bs.inline] +let ghostwhite = "ghostwhite"; + +[@bs.inline] +let gold = "gold"; + +[@bs.inline] +let goldenrod = "goldenrod"; + +[@bs.inline] +let gray = "gray"; + +[@bs.inline] +let green = "green"; + +[@bs.inline] +let greenyellow = "greenyellow"; + +[@bs.inline] +let grey = "grey"; + +[@bs.inline] +let honeydew = "honeydew"; + +[@bs.inline] +let hotpink = "hotpink"; + +[@bs.inline] +let indianred = "indianred"; + +[@bs.inline] +let indigo = "indigo"; + +[@bs.inline] +let ivory = "ivory"; + +[@bs.inline] +let khaki = "khaki"; + +[@bs.inline] +let lavender = "lavender"; + +[@bs.inline] +let lavenderblush = "lavenderblush"; + +[@bs.inline] +let lawngreen = "lawngreen"; + +[@bs.inline] +let lemonchiffon = "lemonchiffon"; + +[@bs.inline] +let lightblue = "lightblue"; + +[@bs.inline] +let lightcoral = "lightcoral"; + +[@bs.inline] +let lightcyan = "lightcyan"; + +[@bs.inline] +let lightgoldenrodyellow = "lightgoldenrodyellow"; + +[@bs.inline] +let lightgray = "lightgray"; + +[@bs.inline] +let lightgreen = "lightgreen"; + +[@bs.inline] +let lightgrey = "lightgrey"; + +[@bs.inline] +let lightpink = "lightpink"; + +[@bs.inline] +let lightsalmon = "lightsalmon"; + +[@bs.inline] +let lightseagreen = "lightseagreen"; + +[@bs.inline] +let lightskyblue = "lightskyblue"; + +[@bs.inline] +let lightslategrey = "lightslategrey"; + +[@bs.inline] +let lightsteelblue = "lightsteelblue"; + +[@bs.inline] +let lightyellow = "lightyellow"; + +[@bs.inline] +let lime = "lime"; + +[@bs.inline] +let limegreen = "limegreen"; + +[@bs.inline] +let linen = "linen"; + +[@bs.inline] +let magenta = "magenta"; + +[@bs.inline] +let maroon = "maroon"; + +[@bs.inline] +let mediumaquamarine = "mediumaquamarine"; + +[@bs.inline] +let mediumblue = "mediumblue"; + +[@bs.inline] +let mediumorchid = "mediumorchid"; + +[@bs.inline] +let mediumpurple = "mediumpurple"; + +[@bs.inline] +let mediumseagreen = "mediumseagreen"; + +[@bs.inline] +let mediumslateblue = "mediumslateblue"; + +[@bs.inline] +let mediumspringgreen = "mediumspringgreen"; + +[@bs.inline] +let mediumturquoise = "mediumturquoise"; + +[@bs.inline] +let mediumvioletred = "mediumvioletred"; + +[@bs.inline] +let midnightblue = "midnightblue"; + +[@bs.inline] +let mintcream = "mintcream"; + +[@bs.inline] +let mistyrose = "mistyrose"; + +[@bs.inline] +let moccasin = "moccasin"; + +[@bs.inline] +let navajowhite = "navajowhite"; + +[@bs.inline] +let navy = "navy"; + +[@bs.inline] +let oldlace = "oldlace"; + +[@bs.inline] +let olive = "olive"; + +[@bs.inline] +let olivedrab = "olivedrab"; + +[@bs.inline] +let orange = "orange"; + +[@bs.inline] +let orangered = "orangered"; + +[@bs.inline] +let orchid = "orchid"; + +[@bs.inline] +let palegoldenrod = "palegoldenrod"; + +[@bs.inline] +let palegreen = "palegreen"; + +[@bs.inline] +let paleturquoise = "paleturquoise"; + +[@bs.inline] +let palevioletred = "palevioletred"; + +[@bs.inline] +let papayawhip = "papayawhip"; + +[@bs.inline] +let peachpuff = "peachpuff"; + +[@bs.inline] +let peru = "peru"; + +[@bs.inline] +let pink = "pink"; + +[@bs.inline] +let plum = "plum"; + +[@bs.inline] +let powderblue = "powderblue"; + +[@bs.inline] +let purple = "purple"; + +[@bs.inline] +let rebeccapurple = "rebeccapurple"; + +[@bs.inline] +let red = "red"; + +[@bs.inline] +let rosybrown = "rosybrown"; + +[@bs.inline] +let royalblue = "royalblue"; + +[@bs.inline] +let saddlebrown = "saddlebrown"; + +[@bs.inline] +let salmon = "salmon"; + +[@bs.inline] +let sandybrown = "sandybrown"; + +[@bs.inline] +let seagreen = "seagreen"; + +[@bs.inline] +let seashell = "seashell"; + +[@bs.inline] +let sienna = "sienna"; + +[@bs.inline] +let silver = "silver"; + +[@bs.inline] +let skyblue = "skyblue"; + +[@bs.inline] +let slateblue = "slateblue"; + +[@bs.inline] +let slategray = "slategray"; + +[@bs.inline] +let snow = "snow"; + +[@bs.inline] +let springgreen = "springgreen"; + +[@bs.inline] +let steelblue = "steelblue"; + +[@bs.inline] +let tan = "tan"; + +[@bs.inline] +let teal = "teal"; + +[@bs.inline] +let thistle = "thistle"; + +[@bs.inline] +let tomato = "tomato"; + +[@bs.inline] +let turquoise = "turquoise"; + +[@bs.inline] +let violet = "violet"; + +[@bs.inline] +let wheat = "wheat"; + +[@bs.inline] +let white = "white"; + +[@bs.inline] +let whitesmoke = "whitesmoke"; + +[@bs.inline] +let yellow = "yellow"; + +[@bs.inline] +let yellowgreen = "yellowgreen"; diff --git a/reason-react-native/src/apis/Style.re b/reason-react-native/src/apis/Style.re index da42a2f0b..a17887bab 100644 --- a/reason-react-native/src/apis/Style.re +++ b/reason-react-native/src/apis/Style.re @@ -15,9 +15,6 @@ module Size = { let pct: float => t = pct->Obj.magic; }; -type color; -external color: string => color = "%identity"; - module Transform = { type angle; @@ -78,25 +75,25 @@ external style: =?, ~aspectRatio: float=?, ~backfaceVisibility: [@bs.string] [ | `visible | `hidden]=?, - ~backgroundColor: color=?, - ~borderBottomColor: color=?, + ~backgroundColor: Color.t=?, + ~borderBottomColor: Color.t=?, ~borderBottomEndRadius: float=?, ~borderBottomLeftRadius: float=?, ~borderBottomRightRadius: float=?, ~borderBottomStartRadius: float=?, ~borderBottomWidth: float=?, - ~borderColor: color=?, - ~borderEndColor: color=?, + ~borderColor: Color.t=?, + ~borderEndColor: Color.t=?, ~borderEndWidth: float=?, - ~borderLeftColor: color=?, + ~borderLeftColor: Color.t=?, ~borderLeftWidth: float=?, ~borderRadius: float=?, - ~borderRightColor: color=?, + ~borderRightColor: Color.t=?, ~borderRightWidth: float=?, - ~borderStartColor: color=?, + ~borderStartColor: Color.t=?, ~borderStartWidth: float=?, ~borderStyle: [@bs.string] [ | `solid | `dotted | `dashed]=?, - ~borderTopColor: color=?, + ~borderTopColor: Color.t=?, ~borderTopEndRadius: float=?, ~borderTopLeftRadius: float=?, ~borderTopRightRadius: float=?, @@ -162,14 +159,14 @@ external style: ~width: Size.t=?, ~zIndex: int=?, // Shadow Props (https://facebook.github.io/react-native/docs/shadow-props) - ~shadowColor: color=?, + ~shadowColor: Color.t=?, ~shadowOffset: offset=?, ~shadowOpacity: float=?, ~shadowRadius: float=?, // Transform Props (https://facebook.github.io/react-native/docs/transforms#props) ~transform: array(Transform.t)=?, // all other transform props are deprecated // Text Style Props (https://facebook.github.io/react-native/docs/text-style-props) - ~color: color=?, + ~color: Color.t=?, ~fontFamily: string=?, ~fontSize: float=?, ~fontStyle: [@bs.string] [ | `normal | `italic]=?, @@ -193,7 +190,7 @@ external style: ~lineHeight: float=?, ~textAlign: [@bs.string] [ | `auto | `left | `right | `center | `justify]=?, ~textAlignVertical: [@bs.string] [ | `auto | `top | `bottom | `center]=?, - ~textDecorationColor: color=?, + ~textDecorationColor: Color.t=?, ~textDecorationLine: [@bs.string] [ | `none | `underline @@ -209,7 +206,7 @@ external style: | `dashed ] =?, - ~textShadowColor: color=?, + ~textShadowColor: Color.t=?, ~textShadowOffset: offset=?, ~textShadowRadius: float=?, ~textTransform: [@bs.string] [ @@ -229,8 +226,8 @@ external style: | `center ] =?, - ~overlayColor: color=?, - ~tintColor: color=?, + ~overlayColor: Color.t=?, + ~tintColor: Color.t=?, unit ) => t = diff --git a/reason-react-native/src/components/ActivityIndicator.md b/reason-react-native/src/components/ActivityIndicator.md index 15a0ac15c..32ce9b347 100644 --- a/reason-react-native/src/components/ActivityIndicator.md +++ b/reason-react-native/src/components/ActivityIndicator.md @@ -20,7 +20,7 @@ external make: ~ref: ref=?, // ActivityIndicator props ~animating: bool=?, - ~color: Style.color=?, + ~color: Color.t=?, ~size: size=?, ~hidesWhenStopped: bool=?, // View props diff --git a/reason-react-native/src/components/ActivityIndicator.re b/reason-react-native/src/components/ActivityIndicator.re index 13b7ee27b..6d232e873 100644 --- a/reason-react-native/src/components/ActivityIndicator.re +++ b/reason-react-native/src/components/ActivityIndicator.re @@ -13,7 +13,7 @@ external make: ~ref: ref=?, // ActivityIndicator props ~animating: bool=?, - ~color: Style.color=?, + ~color: Color.t=?, ~size: size=?, ~hidesWhenStopped: bool=?, // View props diff --git a/reason-react-native/src/components/Button.md b/reason-react-native/src/components/Button.md index 467475b01..11ce3216b 100644 --- a/reason-react-native/src/components/Button.md +++ b/reason-react-native/src/components/Button.md @@ -14,7 +14,7 @@ external make: ~ref: ref=?, // Button props ~accessibilityLabel: string=?, - ~color: Style.color=?, + ~color: Color.t=?, ~disabled: bool=?, ~hasTVPreferredFocus: bool=?, ~onPress: unit => unit, diff --git a/reason-react-native/src/components/Button.re b/reason-react-native/src/components/Button.re index ec8cef685..438a383cc 100644 --- a/reason-react-native/src/components/Button.re +++ b/reason-react-native/src/components/Button.re @@ -7,7 +7,7 @@ external make: ~ref: ref=?, // Button props ~accessibilityLabel: string=?, - ~color: Style.color=?, + ~color: Color.t=?, ~disabled: bool=?, ~hasTVPreferredFocus: bool=?, ~onPress: unit => unit, diff --git a/reason-react-native/src/components/DrawerLayoutAndroid.md b/reason-react-native/src/components/DrawerLayoutAndroid.md index 5fb655767..64d995b1b 100644 --- a/reason-react-native/src/components/DrawerLayoutAndroid.md +++ b/reason-react-native/src/components/DrawerLayoutAndroid.md @@ -38,8 +38,8 @@ external make: ~onDrawerOpen: unit => unit=?, ~onDrawerSlide: drawerSlideEvent => unit=?, ~onDrawerStateChanged: AndroidInteractionState.t => unit=?, - ~drawerBackgroundColor: Style.color=?, - ~statusBarBackgroundColor: Style.color=?, + ~drawerBackgroundColor: Color.t=?, + ~statusBarBackgroundColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/DrawerLayoutAndroid.re b/reason-react-native/src/components/DrawerLayoutAndroid.re index 88cd4019a..12ffa25f0 100644 --- a/reason-react-native/src/components/DrawerLayoutAndroid.re +++ b/reason-react-native/src/components/DrawerLayoutAndroid.re @@ -31,8 +31,8 @@ external make: ~onDrawerOpen: unit => unit=?, ~onDrawerSlide: drawerSlideEvent => unit=?, ~onDrawerStateChanged: AndroidInteractionState.t => unit=?, - ~drawerBackgroundColor: Style.color=?, - ~statusBarBackgroundColor: Style.color=?, + ~drawerBackgroundColor: Color.t=?, + ~statusBarBackgroundColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/FlatList.md b/reason-react-native/src/components/FlatList.md index e80659765..62697225a 100644 --- a/reason-react-native/src/components/FlatList.md +++ b/reason-react-native/src/components/FlatList.md @@ -83,7 +83,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/FlatList.re b/reason-react-native/src/components/FlatList.re index 9389b83bc..a9c8a20f3 100644 --- a/reason-react-native/src/components/FlatList.re +++ b/reason-react-native/src/components/FlatList.re @@ -76,7 +76,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/ImageBackground.md b/reason-react-native/src/components/ImageBackground.md index 6d22de6b0..9dc6cd6e8 100644 --- a/reason-react-native/src/components/ImageBackground.md +++ b/reason-react-native/src/components/ImageBackground.md @@ -14,8 +14,8 @@ type imageStyle; external imageStyle: ( ~backfaceVisibility: [@bs.string] [ | `visible | `hidden]=?, - ~backgroundColor: Style.color=?, - ~borderColor: Style.color=?, + ~backgroundColor: Color.t=?, + ~borderColor: Color.t=?, ~borderRadius: float=?, ~borderBottomLeftRadius: float=?, ~borderBottomRightRadius: float=?, @@ -32,8 +32,8 @@ external imageStyle: | `center ] =?, - ~overlayColor: Style.color=?, - ~tintColor: Style.color=?, + ~overlayColor: Color.t=?, + ~tintColor: Color.t=?, unit ) => imageStyle = diff --git a/reason-react-native/src/components/ImageBackground.re b/reason-react-native/src/components/ImageBackground.re index 3723ca5cc..47aed861f 100644 --- a/reason-react-native/src/components/ImageBackground.re +++ b/reason-react-native/src/components/ImageBackground.re @@ -7,8 +7,8 @@ type imageStyle; external imageStyle: ( ~backfaceVisibility: [@bs.string] [ | `visible | `hidden]=?, - ~backgroundColor: Style.color=?, - ~borderColor: Style.color=?, + ~backgroundColor: Color.t=?, + ~borderColor: Color.t=?, ~borderRadius: float=?, ~borderBottomLeftRadius: float=?, ~borderBottomRightRadius: float=?, @@ -25,8 +25,8 @@ external imageStyle: | `center ] =?, - ~overlayColor: Style.color=?, - ~tintColor: Style.color=?, + ~overlayColor: Color.t=?, + ~tintColor: Color.t=?, unit ) => imageStyle = diff --git a/reason-react-native/src/components/InputAccessoryView.md b/reason-react-native/src/components/InputAccessoryView.md index 02ae91fd1..09d6660b0 100644 --- a/reason-react-native/src/components/InputAccessoryView.md +++ b/reason-react-native/src/components/InputAccessoryView.md @@ -8,7 +8,7 @@ wip: true [@react.component] [@bs.module "react-native"] external make: ( - ~backgroundColor: Style.color=?, + ~backgroundColor: Color.t=?, ~nativeID: string=?, ~style: Style.t=?, ~testID: string=?, @@ -17,4 +17,4 @@ external make: React.element = "InputAccessoryView"; -``` \ No newline at end of file +``` diff --git a/reason-react-native/src/components/InputAccessoryView.re b/reason-react-native/src/components/InputAccessoryView.re index bba6c61a3..05b1055cc 100644 --- a/reason-react-native/src/components/InputAccessoryView.re +++ b/reason-react-native/src/components/InputAccessoryView.re @@ -1,7 +1,7 @@ [@react.component] [@bs.module "react-native"] external make: ( - ~backgroundColor: Style.color=?, + ~backgroundColor: Color.t=?, ~nativeID: string=?, ~style: Style.t=?, ~testID: string=?, diff --git a/reason-react-native/src/components/Picker.md b/reason-react-native/src/components/Picker.md index 51a84f73a..5568d06ef 100644 --- a/reason-react-native/src/components/Picker.md +++ b/reason-react-native/src/components/Picker.md @@ -99,7 +99,7 @@ external make: module Item = { [@react.component] [@bs.module "react-native"] [@bs.scope "Picker"] external make: - (~value: 'a=?, ~label: string, ~color: Style.color=?, ~testID: string=?) => + (~value: 'a=?, ~label: string, ~color: Color.t=?, ~testID: string=?) => React.element = "Item"; }; diff --git a/reason-react-native/src/components/Picker.re b/reason-react-native/src/components/Picker.re index 0107a2ffe..acbde3a31 100644 --- a/reason-react-native/src/components/Picker.re +++ b/reason-react-native/src/components/Picker.re @@ -92,7 +92,7 @@ external make: module Item = { [@react.component] [@bs.module "react-native"] [@bs.scope "Picker"] external make: - (~value: 'a=?, ~label: string, ~color: Style.color=?, ~testID: string=?) => + (~value: 'a=?, ~label: string, ~color: Color.t=?, ~testID: string=?) => React.element = "Item"; }; diff --git a/reason-react-native/src/components/PickerIOS.md b/reason-react-native/src/components/PickerIOS.md index 5ed1fe7f0..444bd2176 100644 --- a/reason-react-native/src/components/PickerIOS.md +++ b/reason-react-native/src/components/PickerIOS.md @@ -93,7 +93,7 @@ external make: module Item = { [@react.component] [@bs.module "react-native"] [@bs.scope "PickerIOS"] external make: - (~value: 'a=?, ~label: string, ~color: Style.color=?, ~testID: string=?) => + (~value: 'a=?, ~label: string, ~color: Color.t=?, ~testID: string=?) => React.element = "Item"; }; diff --git a/reason-react-native/src/components/PickerIOS.re b/reason-react-native/src/components/PickerIOS.re index 0ccdc6535..189e72b3e 100644 --- a/reason-react-native/src/components/PickerIOS.re +++ b/reason-react-native/src/components/PickerIOS.re @@ -86,7 +86,7 @@ external make: module Item = { [@react.component] [@bs.module "react-native"] [@bs.scope "PickerIOS"] external make: - (~value: 'a=?, ~label: string, ~color: Style.color=?, ~testID: string=?) => + (~value: 'a=?, ~label: string, ~color: Color.t=?, ~testID: string=?) => React.element = "Item"; }; diff --git a/reason-react-native/src/components/ProgressBarAndroid.md b/reason-react-native/src/components/ProgressBarAndroid.md index 23be43374..2788c7783 100644 --- a/reason-react-native/src/components/ProgressBarAndroid.md +++ b/reason-react-native/src/components/ProgressBarAndroid.md @@ -14,7 +14,7 @@ external make: ~ref: ref=?, // ProgressBarAndroid props ~animating: bool=?, - ~color: Style.color=?, + ~color: Color.t=?, ~indeterminate: bool=?, ~progress: float=?, ~styleAttr: [@bs.string] [ diff --git a/reason-react-native/src/components/ProgressBarAndroid.re b/reason-react-native/src/components/ProgressBarAndroid.re index 0f4346760..9e7ea5dba 100644 --- a/reason-react-native/src/components/ProgressBarAndroid.re +++ b/reason-react-native/src/components/ProgressBarAndroid.re @@ -7,7 +7,7 @@ external make: ~ref: ref=?, // ProgressBarAndroid props ~animating: bool=?, - ~color: Style.color=?, + ~color: Color.t=?, ~indeterminate: bool=?, ~progress: float=?, ~styleAttr: [@bs.string] [ diff --git a/reason-react-native/src/components/ProgressViewIOS.md b/reason-react-native/src/components/ProgressViewIOS.md index 8aa329dc6..bbe1d16c6 100644 --- a/reason-react-native/src/components/ProgressViewIOS.md +++ b/reason-react-native/src/components/ProgressViewIOS.md @@ -15,10 +15,10 @@ external make: // ProgressViewIOS props ~progress: float, ~progressImage: Image.Source.t=?, - ~progressTintColor: Style.color=?, + ~progressTintColor: Color.t=?, ~progressViewStyle: [@bs.string] [ | `default | `bar]=?, ~trackImage: Image.Source.t=?, - ~trackTintColor: Style.color=?, + ~trackTintColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/ProgressViewIOS.re b/reason-react-native/src/components/ProgressViewIOS.re index 66b0e5ecf..99ef1eb1d 100644 --- a/reason-react-native/src/components/ProgressViewIOS.re +++ b/reason-react-native/src/components/ProgressViewIOS.re @@ -8,10 +8,10 @@ external make: // ProgressViewIOS props ~progress: float, ~progressImage: Image.Source.t=?, - ~progressTintColor: Style.color=?, + ~progressTintColor: Color.t=?, ~progressViewStyle: [@bs.string] [ | `default | `bar]=?, ~trackImage: Image.Source.t=?, - ~trackTintColor: Style.color=?, + ~trackTintColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/RefreshControl.md b/reason-react-native/src/components/RefreshControl.md index eca0f3dca..2d359f682 100644 --- a/reason-react-native/src/components/RefreshControl.md +++ b/reason-react-native/src/components/RefreshControl.md @@ -13,15 +13,15 @@ external make: ( ~ref: ref=?, // RefreshControl props - ~colors: array(Style.color)=?, + ~colors: array(Color.t)=?, ~enabled: bool=?, ~onRefresh: unit => unit=?, - ~progressBackgroundColor: Style.color=?, + ~progressBackgroundColor: Color.t=?, ~progressViewOffset: float=?, ~refreshing: bool, - ~tintColor: Style.color=?, + ~tintColor: Color.t=?, ~title: string=?, - ~titleColor: Style.color=?, + ~titleColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/RefreshControl.re b/reason-react-native/src/components/RefreshControl.re index 08bea3796..2c58f75af 100644 --- a/reason-react-native/src/components/RefreshControl.re +++ b/reason-react-native/src/components/RefreshControl.re @@ -6,15 +6,15 @@ external make: ( ~ref: ref=?, // RefreshControl props - ~colors: array(Style.color)=?, + ~colors: array(Color.t)=?, ~enabled: bool=?, ~onRefresh: unit => unit=?, - ~progressBackgroundColor: Style.color=?, + ~progressBackgroundColor: Color.t=?, ~progressViewOffset: float=?, ~refreshing: bool, - ~tintColor: Style.color=?, + ~tintColor: Color.t=?, ~title: string=?, - ~titleColor: Style.color=?, + ~titleColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/ScrollView.md b/reason-react-native/src/components/ScrollView.md index ec8358719..85e2c17cc 100644 --- a/reason-react-native/src/components/ScrollView.md +++ b/reason-react-native/src/components/ScrollView.md @@ -32,7 +32,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/ScrollView.re b/reason-react-native/src/components/ScrollView.re index a9b30f9c0..f6bef9742 100644 --- a/reason-react-native/src/components/ScrollView.re +++ b/reason-react-native/src/components/ScrollView.re @@ -25,7 +25,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/SectionList.md b/reason-react-native/src/components/SectionList.md index b457e94be..862bac295 100644 --- a/reason-react-native/src/components/SectionList.md +++ b/reason-react-native/src/components/SectionList.md @@ -91,7 +91,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/SectionList.re b/reason-react-native/src/components/SectionList.re index ca76c05f5..08c161b7d 100644 --- a/reason-react-native/src/components/SectionList.re +++ b/reason-react-native/src/components/SectionList.re @@ -84,7 +84,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/Slider.md b/reason-react-native/src/components/Slider.md index 4bb7089f1..189df9552 100644 --- a/reason-react-native/src/components/Slider.md +++ b/reason-react-native/src/components/Slider.md @@ -15,16 +15,16 @@ external make: // Slider props ~disabled: bool=?, ~maximumTrackImage: Image.Source.t=?, - ~maximumTrackTintColor: Style.color=?, + ~maximumTrackTintColor: Color.t=?, ~maximumValue: float=?, ~minimumTrackImage: Image.Source.t=?, - ~minimumTrackTintColor: Style.color=?, + ~minimumTrackTintColor: Color.t=?, ~minimumValue: float=?, ~onSlidingComplete: float => unit=?, ~onValueChange: float => unit=?, ~step: float=?, ~thumbImage: Image.Source.t=?, - ~thumbTintColor: Style.color=?, + ~thumbTintColor: Color.t=?, ~trackImage: Image.Source.t=?, ~value: float=?, // View props diff --git a/reason-react-native/src/components/Slider.re b/reason-react-native/src/components/Slider.re index bb4eac56d..d0ade1a00 100644 --- a/reason-react-native/src/components/Slider.re +++ b/reason-react-native/src/components/Slider.re @@ -8,16 +8,16 @@ external make: // Slider props ~disabled: bool=?, ~maximumTrackImage: Image.Source.t=?, - ~maximumTrackTintColor: Style.color=?, + ~maximumTrackTintColor: Color.t=?, ~maximumValue: float=?, ~minimumTrackImage: Image.Source.t=?, - ~minimumTrackTintColor: Style.color=?, + ~minimumTrackTintColor: Color.t=?, ~minimumValue: float=?, ~onSlidingComplete: float => unit=?, ~onValueChange: float => unit=?, ~step: float=?, ~thumbImage: Image.Source.t=?, - ~thumbTintColor: Style.color=?, + ~thumbTintColor: Color.t=?, ~trackImage: Image.Source.t=?, ~value: float=?, // View props diff --git a/reason-react-native/src/components/Switch.md b/reason-react-native/src/components/Switch.md index 1c01ed752..a97c45ee2 100644 --- a/reason-react-native/src/components/Switch.md +++ b/reason-react-native/src/components/Switch.md @@ -10,8 +10,8 @@ type ref = React.Ref.t(Js.nullable(element)); type trackColor; [@bs.obj] external trackColor: ( - ~_true: Style.color=?, - ~_false: Style.color=?, + ~_true: Color.t=?, + ~_false: Color.t=?, unit ) => trackColor = ""; @@ -22,10 +22,10 @@ external make: // Switch props ~disabled: bool=?, ~trackColor: trackColor=?, - ~ios_backgroundColor: Style.color=?, + ~ios_backgroundColor: Color.t=?, ~onValueChange: bool => unit=?, - ~thumbColor: Style.color=?, - ~tintColor: Style.color=?, + ~thumbColor: Color.t=?, + ~tintColor: Color.t=?, ~value: bool=?, // View props ~accessibilityComponentType: [@bs.string] [ diff --git a/reason-react-native/src/components/Switch.re b/reason-react-native/src/components/Switch.re index e4c87c821..4532c8937 100644 --- a/reason-react-native/src/components/Switch.re +++ b/reason-react-native/src/components/Switch.re @@ -4,7 +4,7 @@ type ref = React.Ref.t(Js.nullable(element)); type trackColor; [@bs.obj] external trackColor: - (~_true: Style.color=?, ~_false: Style.color=?, unit) => trackColor = + (~_true: Color.t=?, ~_false: Color.t=?, unit) => trackColor = ""; [@react.component] [@bs.module "react-native"] @@ -14,10 +14,10 @@ external make: // Switch props ~disabled: bool=?, ~trackColor: trackColor=?, - ~ios_backgroundColor: Style.color=?, + ~ios_backgroundColor: Color.t=?, ~onValueChange: bool => unit=?, - ~thumbColor: Style.color=?, - ~tintColor: Style.color=?, + ~thumbColor: Color.t=?, + ~tintColor: Color.t=?, ~value: bool=?, // View props ~accessibilityComponentType: [@bs.string] [ diff --git a/reason-react-native/src/components/TabBarIOS.md b/reason-react-native/src/components/TabBarIOS.md index e031912a9..9e4e28379 100644 --- a/reason-react-native/src/components/TabBarIOS.md +++ b/reason-react-native/src/components/TabBarIOS.md @@ -14,12 +14,12 @@ external make: ~ref: ref=?, // TabBarIOS props ~barStyle: [@bs.string] [ | `default | `black]=?, - ~barTintColor: Style.color=?, + ~barTintColor: Color.t=?, ~itemPositioning: [@bs.string] [ | `fill | `center | `auto]=?, - ~tintColor: Style.color=?, + ~tintColor: Color.t=?, ~translucent: bool=?, - ~unselectedItemTintColor: Style.color=?, - ~unselectedTintColor: Style.color=?, + ~unselectedItemTintColor: Color.t=?, + ~unselectedTintColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/TabBarIOS.re b/reason-react-native/src/components/TabBarIOS.re index 685e1937a..b91ff7983 100644 --- a/reason-react-native/src/components/TabBarIOS.re +++ b/reason-react-native/src/components/TabBarIOS.re @@ -7,12 +7,12 @@ external make: ~ref: ref=?, // TabBarIOS props ~barStyle: [@bs.string] [ | `default | `black]=?, - ~barTintColor: Style.color=?, + ~barTintColor: Color.t=?, ~itemPositioning: [@bs.string] [ | `fill | `center | `auto]=?, - ~tintColor: Style.color=?, + ~tintColor: Color.t=?, ~translucent: bool=?, - ~unselectedItemTintColor: Style.color=?, - ~unselectedTintColor: Style.color=?, + ~unselectedItemTintColor: Color.t=?, + ~unselectedTintColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/TextInput.md b/reason-react-native/src/components/TextInput.md index 84fbbb200..2748c869a 100644 --- a/reason-react-native/src/components/TextInput.md +++ b/reason-react-native/src/components/TextInput.md @@ -143,7 +143,7 @@ external make: ~onSelectionChange: selectionEvent => unit=?, ~onSubmitEditing: editingEvent => unit=?, ~placeholder: string=?, - ~placeholderTextColor: Style.color=?, + ~placeholderTextColor: Color.t=?, ~returnKeyLabel: string=?, ~returnKeyType: [@bs.string] [ | [@bs.as "done"] `done_ @@ -165,7 +165,7 @@ external make: ~scrollEnabled: bool=?, ~secureTextEntry: bool=?, ~selection: selection=?, - ~selectionColor: Style.color=?, + ~selectionColor: Color.t=?, ~selectionState: 'documentSelectionState=?, // TODO ~selectTextOnFocus: bool=?, ~spellCheck: bool=?, @@ -201,7 +201,7 @@ external make: | `oneTimeCode ] =?, - ~underlineColorAndroid: Style.color=?, + ~underlineColorAndroid: Color.t=?, ~value: string=?, // View props ~accessibilityComponentType: [@bs.string] [ diff --git a/reason-react-native/src/components/TextInput.re b/reason-react-native/src/components/TextInput.re index 4ea746a43..265420170 100644 --- a/reason-react-native/src/components/TextInput.re +++ b/reason-react-native/src/components/TextInput.re @@ -136,7 +136,7 @@ external make: ~onSelectionChange: selectionEvent => unit=?, ~onSubmitEditing: editingEvent => unit=?, ~placeholder: string=?, - ~placeholderTextColor: Style.color=?, + ~placeholderTextColor: Color.t=?, ~returnKeyLabel: string=?, ~returnKeyType: [@bs.string] [ | [@bs.as "done"] `done_ @@ -158,7 +158,7 @@ external make: ~scrollEnabled: bool=?, ~secureTextEntry: bool=?, ~selection: selection=?, - ~selectionColor: Style.color=?, + ~selectionColor: Color.t=?, ~selectionState: 'documentSelectionState=?, // TODO ~selectTextOnFocus: bool=?, ~spellCheck: bool=?, @@ -194,7 +194,7 @@ external make: | `oneTimeCode ] =?, - ~underlineColorAndroid: Style.color=?, + ~underlineColorAndroid: Color.t=?, ~value: string=?, // View props ~accessibilityComponentType: [@bs.string] [ diff --git a/reason-react-native/src/components/ToolbarAndroid.md b/reason-react-native/src/components/ToolbarAndroid.md index 3434fe625..8a91cac6e 100644 --- a/reason-react-native/src/components/ToolbarAndroid.md +++ b/reason-react-native/src/components/ToolbarAndroid.md @@ -36,9 +36,9 @@ external make: ~contentInsetEnd: float=?, ~rtl: bool=?, ~subtitle: string=?, - ~subtitleColor: Style.color=?, + ~subtitleColor: Color.t=?, ~title: string=?, - ~titleColor: Style.color=?, + ~titleColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/ToolbarAndroid.re b/reason-react-native/src/components/ToolbarAndroid.re index 53ae19258..1992a2b94 100644 --- a/reason-react-native/src/components/ToolbarAndroid.re +++ b/reason-react-native/src/components/ToolbarAndroid.re @@ -29,9 +29,9 @@ external make: ~contentInsetEnd: float=?, ~rtl: bool=?, ~subtitle: string=?, - ~subtitleColor: Style.color=?, + ~subtitleColor: Color.t=?, ~title: string=?, - ~titleColor: Style.color=?, + ~titleColor: Color.t=?, // View props ~accessibilityComponentType: [@bs.string] [ | `none diff --git a/reason-react-native/src/components/VirtualizedList.md b/reason-react-native/src/components/VirtualizedList.md index 62090c3ce..f9e7cb715 100644 --- a/reason-react-native/src/components/VirtualizedList.md +++ b/reason-react-native/src/components/VirtualizedList.md @@ -137,7 +137,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/VirtualizedList.re b/reason-react-native/src/components/VirtualizedList.re index a6ceff725..525112eac 100644 --- a/reason-react-native/src/components/VirtualizedList.re +++ b/reason-react-native/src/components/VirtualizedList.re @@ -130,7 +130,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/VirtualizedSectionList.md b/reason-react-native/src/components/VirtualizedSectionList.md index 0da60121e..62caea94c 100644 --- a/reason-react-native/src/components/VirtualizedSectionList.md +++ b/reason-react-native/src/components/VirtualizedSectionList.md @@ -112,7 +112,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/reason-react-native/src/components/VirtualizedSectionList.re b/reason-react-native/src/components/VirtualizedSectionList.re index 9e62ebd2e..33877bb7b 100644 --- a/reason-react-native/src/components/VirtualizedSectionList.re +++ b/reason-react-native/src/components/VirtualizedSectionList.re @@ -105,7 +105,7 @@ external make: ~contentOffset: Types.point=?, ~decelerationRate: [@bs.string] [ | `fast | `normal]=?, ~directionalLockEnabled: bool=?, - ~endFillColor: Style.color=?, + ~endFillColor: Color.t=?, ~horizontal: bool=?, ~indicatorStyle: [@bs.string] [ | `default | `black | `white]=?, ~keyboardDismissMode: [@bs.string] [ diff --git a/website/src/components/Container.re b/website/src/components/Container.re index f7c946dbc..f63ad9af3 100644 --- a/website/src/components/Container.re +++ b/website/src/components/Container.re @@ -28,7 +28,7 @@ let make = arrayOption([| Some(styles##wrapper), backgroundColor->Belt.Option.map(bg => - style(~backgroundColor=color(bg), ()) + style(~backgroundColor=bg, ()) ), wrapperStyle, |]) diff --git a/website/src/components/HeaderLarge.re b/website/src/components/HeaderLarge.re index b80228a49..5726d34ca 100644 --- a/website/src/components/HeaderLarge.re +++ b/website/src/components/HeaderLarge.re @@ -8,8 +8,8 @@ let styles = ~justifyContent=`center, ~alignItems=`center, ~borderTopWidth=8., - ~borderColor=color(Consts.Colors.accent), - ~shadowColor=color("#000"), + ~borderColor=Consts.Colors.accent, + ~shadowColor="#000", ~shadowOffset=offset(~width=0., ~height=5.), ~shadowOpacity=0.15, ~shadowRadius=20., @@ -23,7 +23,7 @@ let styles = ~justifyContent=`spaceBetween, (), ), - "barWrapper": style(~backgroundColor=color(Consts.Colors.dark), ()), + "barWrapper": style(~backgroundColor=Consts.Colors.dark, ()), "logo": style( ~flex=1., @@ -38,7 +38,7 @@ let styles = style( ~fontSize=18., ~fontWeight=`_700, - ~color=color(Consts.Colors.light), + ~color=Consts.Colors.light, (), ), "links": @@ -55,7 +55,7 @@ let styles = ~fontSize=18., ~lineHeight=18. *. 1.7, ~fontWeight=`_300, - ~color=color(Consts.Colors.light), + ~color=Consts.Colors.light, (), ), "linkActive": diff --git a/website/src/components/Homepage.re b/website/src/components/Homepage.re index e77b778a5..cd1f845b5 100644 --- a/website/src/components/Homepage.re +++ b/website/src/components/Homepage.re @@ -7,7 +7,7 @@ let styles = style( ~fontSize=28., ~fontWeight=`_300, - ~color=color(Consts.Colors.lightest), + ~color=Consts.Colors.lightest, (), ), }, @@ -23,7 +23,7 @@ let make = () => ~flex=1., ~justifyContent=`center, ~alignItems=`center, - ~backgroundColor=color(Consts.Colors.darkless), + ~backgroundColor=Consts.Colors.darkless, (), ) )> @@ -33,7 +33,7 @@ let make = () => style( ~fontSize=52., ~fontWeight=`_700, - ~color=color(Consts.Colors.light), + ~color=Consts.Colors.light, (), ) )> @@ -81,11 +81,7 @@ let make = () => style( ~fontSize=24., ~fontWeight=`_300, - ~color=color(Consts.Colors.lightest), + ~color=Consts.Colors.lightest, (), ) )> @@ -108,7 +104,7 @@ let make = () => style=Style.( style( ~fontWeight=`_300, - ~color=color(Consts.Colors.greyLight), + ~color=Consts.Colors.greyLight, ~alignSelf=`center, (), ) diff --git a/website/src/components/PageContent.re b/website/src/components/PageContent.re index 0432d37f0..ec1920456 100644 --- a/website/src/components/PageContent.re +++ b/website/src/components/PageContent.re @@ -27,19 +27,19 @@ let styles = style( ~fontSize=52., ~fontWeight=`_700, - ~color=Consts.Colors.darkless->color, + ~color=Consts.Colors.darkless, (), ), "editLink": style( ~borderWidth=1., ~borderStyle=`solid, - ~borderColor=color(Consts.Colors.accent), + ~borderColor=Consts.Colors.accent, ~borderRadius=4., (), ), "editLinkText": - style(~color=color(Consts.Colors.accent), ~alignItems=`center, ()), + style(~color=Consts.Colors.accent, ~alignItems=`center, ()), "officialDocLink": style( ~display=`flex, @@ -47,20 +47,20 @@ let styles = ~fontSize=14., ~fontWeight=`_300, ~alignItems=`center, - ~color=color(Consts.Colors.accent), + ~color=Consts.Colors.accent, (), ), "wip": style( ~borderWidth=1., ~borderStyle=`solid, - ~borderColor=color("#ffe58f"), - ~backgroundColor=color("#fffbe6"), + ~borderColor="#ffe58f", + ~backgroundColor="#fffbe6", ~borderRadius=4., (), ), "wipText": style(~fontSize=16., ~lineHeight=16. *. 1.5, ()), - "wipEditLink": style(~color=color(Consts.Colors.accent), ()), + "wipEditLink": style(~color=Consts.Colors.accent, ()), "body": style(~display=`flex, ()), }, ); diff --git a/website/src/components/Sidebar.re b/website/src/components/Sidebar.re index d4c79fc94..c1b0354f6 100644 --- a/website/src/components/Sidebar.re +++ b/website/src/components/Sidebar.re @@ -5,13 +5,12 @@ let styles = StyleSheet.create( Style.{ "container": style(~height=100.->Size.pct, ~overflow=`scroll, ()), - "title": - style(~fontSize=16., ~fontWeight=`_600, ~color="#333"->color, ()), + "title": style(~fontSize=16., ~fontWeight=`_600, ~color="#333", ()), "link": style( ~fontSize=14., ~fontWeight=`_400, - ~color="#555"->color, + ~color="#555", ~paddingVertical=(Spacer.space /. 4.)->Size.pt, (), ), @@ -19,7 +18,7 @@ let styles = style( ~fontSize=14., ~fontWeight=`_400, - ~color="#ddd"->color, + ~color="#ddd", ~paddingVertical=(Spacer.space /. 4.)->Size.pt, (), ),