The UserPreferences
component renders the user preferences menu. The default user preferences comes with a daily
restart menu item and a workspace menu item. You can also implement and add your own customized menu items.
Prop | Type | Required | Default Value | Description |
---|---|---|---|---|
sections | object | Yes | {"General": General, "Workspaces": Workspaces} |
The entry names and the corresponding components to render for that entry. |
You can add your own customized entry name and the component to render for that entry to the sections
prop for it to
show up in the user preference window:
import { MyCustomizedPreference } from "./MyCustomizedPreference";
const sections = {
General: General,
Workspaces: Workspaces,
"My Entry": MyCustomizedPreference,
};
Here's how the <UserPreferences>
component is used in the default seed project:
import { UserPreferences, General, Workspaces } from "@finsemble/finsemble-ui/react/components/UserPreferences";
const sections = {
General: General,
Workspaces: Workspaces,
};
ReactDOM.render(<UserPreferences sections={sections} />, document.getElementById("UserPreferences-component-wrapper"));