1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 15:14:23 +00:00
festa/components/form/FormDateRange.tsx

33 lines
849 B
TypeScript
Raw Normal View History

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>
)
}