From 907b34c496a3c8d0ac9de64389950e03c96c4882 Mon Sep 17 00:00:00 2001 From: Savanni D'Gerinel Date: Tue, 20 Aug 2024 12:07:38 -0400 Subject: [PATCH] Rename Launcher components --- gm-dash/ui/src/App.tsx | 14 +++++++------- .../Activator.css => Launcher/Launcher.css} | 0 .../Activator.tsx => Launcher/Launcher.tsx} | 8 ++++---- .../LauncherGroup.css} | 0 .../LauncherGroup.tsx} | 12 ++++++------ 5 files changed, 17 insertions(+), 17 deletions(-) rename gm-dash/ui/src/components/{Activator/Activator.css => Launcher/Launcher.css} (100%) rename gm-dash/ui/src/components/{Activator/Activator.tsx => Launcher/Launcher.tsx} (68%) rename gm-dash/ui/src/components/{Selector/Selector.css => LauncherGroup/LauncherGroup.css} (100%) rename gm-dash/ui/src/components/{Selector/Selector.tsx => LauncherGroup/LauncherGroup.tsx} (65%) 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;