Skip to content

Commit

Permalink
refactor: added classes for billing section and billing details text
Browse files Browse the repository at this point in the history
  • Loading branch information
Saksham Sharma authored and Saksham Sharma committed Aug 8, 2024
1 parent 8039a9b commit be7ee2f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
64 changes: 32 additions & 32 deletions src/Components/DropdownField.res
Original file line number Diff line number Diff line change
Expand Up @@ -101,42 +101,42 @@ let make = (
</div>
</RenderIf>
<div className="relative">
<div className={`Input ${className} appearance-none relative`}>
<RenderIf condition={isDisplayValueVisible && displayValue->Option.isSome}>
<div
className="absolute top-1 left-1 right-0 bottom-0 pointer-events-none rounded-sm z-20 whitespace-nowrap"
style={
background: disabled ? disbaledBG : themeObj.colorBackground,
opacity: disabled ? "35%" : "",
padding: themeObj.spacingUnit,
width: "95%",
}>
{React.string(displayValue->Option.getOr(""))}
</div>
</RenderIf>
<select
ref={dropdownRef->ReactDOM.Ref.domRef}
// <div className={`Input ${className} appearance-none relative`}>
<RenderIf condition={isDisplayValueVisible && displayValue->Option.isSome}>
<div
className="absolute top-1 left-1 right-0 bottom-0 pointer-events-none rounded-sm z-20 whitespace-nowrap"
style={
background: disabled ? disbaledBG : themeObj.colorBackground,
opacity: disabled ? "35%" : "",
padding: themeObj.spacingUnit,
width: "100%",
}
name=""
value
disabled={readOnly || disabled}
onChange=handleChange
onFocus=handleFocus
className={`${inputClassStyles} ${className} w-full appearance-none outline-none ${cursorClass}`}>
{options
->Array.mapWithIndex((item, index) => {
<option key={Int.toString(index)} value=item.value>
{React.string(item.label->Option.getOr(item.value))}
</option>
})
->React.array}
</select>
</div>
width: "95%",
}>
{React.string(displayValue->Option.getOr(""))}
</div>
</RenderIf>
<select
ref={dropdownRef->ReactDOM.Ref.domRef}
style={
background: disabled ? disbaledBG : themeObj.colorBackground,
opacity: disabled ? "35%" : "",
padding: themeObj.spacingUnit,
width: "100%",
}
name=""
value
disabled={readOnly || disabled}
onChange=handleChange
onFocus=handleFocus
className={`${inputClassStyles} ${className} w-full appearance-none outline-none ${cursorClass}`}>
{options
->Array.mapWithIndex((item, index) => {
<option key={Int.toString(index)} value=item.value>
{React.string(item.label->Option.getOr(item.value))}
</option>
})
->React.array}
</select>
// </div>
<RenderIf condition={config.appearance.labels == Floating}>
<div
className={`Label ${floatinglabelClass} absolute bottom-0 ml-3 ${focusClass}`}
Expand Down
3 changes: 2 additions & 1 deletion src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -493,13 +493,14 @@ let make = (
->React.array}
<RenderIf condition={isRenderDynamicFieldsInsideBilling}>
<div
className={`${spacedStylesForBiilingDetails} w-full text-left`}
className={`billing__section ${spacedStylesForBiilingDetails} w-full text-left`}
style={
border: {isSpacedInnerLayout ? `1px solid ${themeObj.borderColor}` : ""},
borderRadius: {isSpacedInnerLayout ? themeObj.borderRadius : ""},
margin: {isSpacedInnerLayout ? `10px 0` : ""},
}>
<div
className="billing__details__text"
style={
marginBottom: "5px",
fontSize: themeObj.fontSizeLg,
Expand Down

0 comments on commit be7ee2f

Please sign in to comment.