Add options
This commit is contained in:
34
src/components/main/routes/Options.tsx
Normal file
34
src/components/main/routes/Options.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { path } from "ramda";
|
||||
import { ForecastDatePicker } from "@/components/ui/DatePicker";
|
||||
|
||||
export const Options = function ({ state, updateState }) {
|
||||
return (
|
||||
<div
|
||||
className="flex flex-col p-5 bg-white border border-solid border-slate-300 rounded-lg space-y-5 w-full h-full"
|
||||
style={{ maxWidth: "810px", maxHeight: "470px" }}
|
||||
>
|
||||
<h1 className="text-lg font-medium mb-1">Options</h1>
|
||||
<label className="font-medium">
|
||||
Chart line width:
|
||||
<Input
|
||||
type="number"
|
||||
defaultValue="1"
|
||||
min="1"
|
||||
value={path(["options", "lineWidth"], state)}
|
||||
onChange={(e) =>
|
||||
updateState({ options: { lineWidth: e.target.value } })
|
||||
}
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
<ForecastDatePicker
|
||||
onChange={(dateTime) =>
|
||||
updateState({ options: { defaultDate: dateTime } })
|
||||
}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user