Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: added classes for billing section and billing details text #553

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 30 additions & 32 deletions src/Components/DropdownField.res
Original file line number Diff line number Diff line change
Expand Up @@ -101,42 +101,40 @@ 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}
<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>
<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
Loading