-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
715 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
open Button | ||
|
||
@react.component | ||
let make = ( | ||
~text=?, | ||
~buttonState: buttonState=Normal, | ||
~buttonType: buttonType=SecondaryFilled, | ||
~buttonVariant: buttonVariant=Fit, | ||
~buttonSize: option<buttonSize>=?, | ||
~leftIcon: iconType=NoIcon, | ||
~rightIcon: iconType=NoIcon, | ||
~showBorder=true, | ||
~type_="button", | ||
~onClick=?, | ||
~textStyle="", | ||
~customIconMargin=?, | ||
~customTextSize=?, | ||
~customIconSize=?, | ||
~textWeight=?, | ||
~fullLength=false, | ||
~disableRipple=false, | ||
~customButtonStyle="", | ||
~textStyleClass=?, | ||
~customTextPaddingClass=?, | ||
~allowButtonTextMinWidth=true, | ||
~customPaddingClass=?, | ||
~customRoundedClass=?, | ||
~customHeightClass=?, | ||
~customBackColor=?, | ||
~showBtnTextToolTip=false, | ||
~access=AuthTypes.Access, | ||
~tooltipText="You do not have the required permissions to access this module. Please contact your administrator for necessary permissions.", | ||
~toolTipPosition=?, | ||
) => { | ||
let buttonState = switch access { | ||
| Access => buttonState | ||
| NoAccess => Button.Disabled | ||
} | ||
|
||
let showBtnTextToolTip = access === NoAccess | ||
|
||
<Button | ||
buttonState | ||
?text | ||
buttonType | ||
buttonVariant | ||
?buttonSize | ||
leftIcon | ||
rightIcon | ||
showBorder | ||
type_ | ||
?onClick | ||
textStyle | ||
?customIconMargin | ||
?customTextSize | ||
?customIconSize | ||
?textWeight | ||
fullLength | ||
disableRipple | ||
customButtonStyle | ||
?textStyleClass | ||
?customTextPaddingClass | ||
allowButtonTextMinWidth | ||
?customPaddingClass | ||
?customRoundedClass | ||
?customHeightClass | ||
?customBackColor | ||
showBtnTextToolTip | ||
tooltipText | ||
?toolTipPosition | ||
/> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@react.component | ||
let make: ( | ||
~text: string=?, | ||
~buttonState: Button.buttonState=?, | ||
~buttonType: Button.buttonType=?, | ||
~buttonVariant: Button.buttonVariant=?, | ||
~buttonSize: Button.buttonSize=?, | ||
~leftIcon: Button.iconType=?, | ||
~rightIcon: Button.iconType=?, | ||
~showBorder: bool=?, | ||
~type_: string=?, | ||
~onClick: JsxEvent.Mouse.t => unit=?, | ||
~textStyle: string=?, | ||
~customIconMargin: string=?, | ||
~customTextSize: string=?, | ||
~customIconSize: int=?, | ||
~textWeight: string=?, | ||
~fullLength: bool=?, | ||
~disableRipple: bool=?, | ||
~customButtonStyle: string=?, | ||
~textStyleClass: string=?, | ||
~customTextPaddingClass: string=?, | ||
~allowButtonTextMinWidth: bool=?, | ||
~customPaddingClass: string=?, | ||
~customRoundedClass: string=?, | ||
~customHeightClass: string=?, | ||
~customBackColor: string=?, | ||
~showBtnTextToolTip: bool=?, | ||
~access: AuthTypes.authorization=?, | ||
~tooltipText: Js.String2.t=?, | ||
~toolTipPosition: ToolTip.toolTipPosition=?, | ||
) => React.element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.