2022-06-07 11:41:26 +00:00
|
|
|
import classNames from "classnames"
|
2022-06-06 01:15:44 +00:00
|
|
|
import { ReactNode } from "react"
|
|
|
|
|
|
|
|
type FormDateRangeProps = {
|
2022-06-07 11:41:26 +00:00
|
|
|
preview: boolean,
|
2022-06-06 01:15:44 +00:00
|
|
|
icon: ReactNode,
|
|
|
|
start: ReactNode,
|
|
|
|
connector: ReactNode,
|
|
|
|
end: ReactNode,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function FormDateRange(props: FormDateRangeProps) {
|
|
|
|
return (
|
2022-06-07 11:41:26 +00:00
|
|
|
<div className={classNames({
|
|
|
|
"form-daterange": true,
|
|
|
|
"form-daterange-preview": props.preview,
|
|
|
|
})}>
|
2022-06-06 01:15:44 +00:00
|
|
|
<div className="form-daterange-icon">
|
|
|
|
{props.icon}
|
|
|
|
</div>
|
|
|
|
<div className="form-daterange-start">
|
|
|
|
{props.start}
|
|
|
|
</div>
|
|
|
|
<div className="form-daterange-connector">
|
|
|
|
{props.connector}
|
|
|
|
</div>
|
|
|
|
<div className="form-daterange-end">
|
|
|
|
{props.end}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|