diff --git a/gm-dash/ui/src/App.tsx b/gm-dash/ui/src/App.tsx index 8f5ee62..c0e6879 100644 --- a/gm-dash/ui/src/App.tsx +++ b/gm-dash/ui/src/App.tsx @@ -1,10 +1,10 @@ import './App.css'; import Card from './components/Card/Card'; -import Activator from './components/Activator/Activator'; -import Selector from './components/Selector/Selector'; +import Launcher from './components/Launcher/Launcher'; +import LauncherGroup from './components/LauncherGroup/LauncherGroup'; const LightThemes = () => -

{name}

const Tracks = () => - interface TrackProps { name: string, } -const Track = ({ name }: TrackProps) => +const Track = ({ name }: TrackProps) => const Presets = () => - +// const Scene = ({ name }: PresetProps) => const SceneEditor = () =>
diff --git a/gm-dash/ui/src/components/Activator/Activator.css b/gm-dash/ui/src/components/Launcher/Launcher.css similarity index 100% rename from gm-dash/ui/src/components/Activator/Activator.css rename to gm-dash/ui/src/components/Launcher/Launcher.css diff --git a/gm-dash/ui/src/components/Activator/Activator.tsx b/gm-dash/ui/src/components/Launcher/Launcher.tsx similarity index 68% rename from gm-dash/ui/src/components/Activator/Activator.tsx rename to gm-dash/ui/src/components/Launcher/Launcher.tsx index 6d5668f..2e001ee 100644 --- a/gm-dash/ui/src/components/Activator/Activator.tsx +++ b/gm-dash/ui/src/components/Launcher/Launcher.tsx @@ -1,14 +1,14 @@ -import './Activator.css'; +import './Launcher.css'; import React from 'react'; -export interface ActivatorProps { +export interface LauncherProps { title: string, icon?: string, activated?: boolean, onSelected?: (key: string) => void, } -const Activator = ({ title, activated = false, onSelected = (key) => {} }: ActivatorProps) => { +const Launcher = ({ title, activated = false, onSelected = (key) => {} }: LauncherProps) => { const classnames = activated ? "activator activator_enabled" : "activator"; console.log("classnames ", activated, classnames); return ( @@ -17,4 +17,4 @@ const Activator = ({ title, activated = false, onSelected = (key) => {} }: Activ ) } -export default Activator; +export default Launcher; diff --git a/gm-dash/ui/src/components/Selector/Selector.css b/gm-dash/ui/src/components/LauncherGroup/LauncherGroup.css similarity index 100% rename from gm-dash/ui/src/components/Selector/Selector.css rename to gm-dash/ui/src/components/LauncherGroup/LauncherGroup.css diff --git a/gm-dash/ui/src/components/Selector/Selector.tsx b/gm-dash/ui/src/components/LauncherGroup/LauncherGroup.tsx similarity index 65% rename from gm-dash/ui/src/components/Selector/Selector.tsx rename to gm-dash/ui/src/components/LauncherGroup/LauncherGroup.tsx index ecbce9d..89a330c 100644 --- a/gm-dash/ui/src/components/Selector/Selector.tsx +++ b/gm-dash/ui/src/components/LauncherGroup/LauncherGroup.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import Activator, { ActivatorProps } from '../Activator/Activator'; +import Launcher, { LauncherProps } from '../Launcher/Launcher'; export interface Selectable { onSelected?: (key: string) => void; } -interface SelectorProps { - options: Array; +interface LauncherGroupProps { + options: Array; exclusive: boolean; } @@ -23,14 +23,14 @@ const multiSelect = (state: { [key: string]: boolean }, targetId: string) => { } } -const Selector = ({ options, exclusive }: SelectorProps) => { +const LauncherGroup = ({ options, exclusive }: LauncherGroupProps) => { const [selected, dispatch] = React.useReducer(exclusive ? exclusiveSelect : multiSelect, {}); let tiedOptions = options.map(option => - dispatch(key)} activated={selected[option.title]} /> + dispatch(key)} activated={selected[option.title]} /> ); return (
{tiedOptions}
) } -export default Selector; +export default LauncherGroup;