feat: sprint 5 — simulation templates + instantiation + nav + dropdown #8
@@ -1,6 +1,6 @@
|
|||||||
import { useRef, useState } from 'react';
|
import { useRef, useState } from 'react';
|
||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
import { ChevronDown } from 'lucide-react';
|
import { ChevronDown, Plus } from 'lucide-react';
|
||||||
import { extractApiError } from '@/api/client';
|
import { extractApiError } from '@/api/client';
|
||||||
import type { SimulationTemplate } from '@/api/types';
|
import type { SimulationTemplate } from '@/api/types';
|
||||||
import { useAuth } from '@/hooks/useAuth';
|
import { useAuth } from '@/hooks/useAuth';
|
||||||
@@ -59,7 +59,7 @@ function NewSimulationDropdown({ engagementId }: { engagementId: number }): JSX.
|
|||||||
onClick={handleBlank}
|
onClick={handleBlank}
|
||||||
data-testid="new-simulation-btn"
|
data-testid="new-simulation-btn"
|
||||||
>
|
>
|
||||||
New simulation
|
<Plus size={14} aria-hidden /> New
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@@ -75,13 +75,13 @@ function NewSimulationDropdown({ engagementId }: { engagementId: number }): JSX.
|
|||||||
|
|
||||||
{open ? (
|
{open ? (
|
||||||
<div
|
<div
|
||||||
className="absolute right-0 top-full mt-xxs bg-canvas border border-hairline rounded-md shadow-floating z-20 min-w-[180px]"
|
className="absolute right-0 top-full mt-xxs bg-canvas border border-hairline rounded-md shadow-floating dark:shadow-floating-dark z-20 min-w-[180px]"
|
||||||
role="menu"
|
role="menu"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
className="w-full text-left px-md py-sm text-[14px] text-ink hover:bg-cloud"
|
className="w-full text-left px-md py-sm text-[14px] text-ink hover:bg-cloud dark:hover:bg-fog"
|
||||||
onClick={handleBlank}
|
onClick={handleBlank}
|
||||||
>
|
>
|
||||||
Blank
|
Blank
|
||||||
@@ -89,7 +89,7 @@ function NewSimulationDropdown({ engagementId }: { engagementId: number }): JSX.
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
className="w-full text-left px-md py-sm text-[14px] text-ink hover:bg-cloud"
|
className="w-full text-left px-md py-sm text-[14px] text-ink hover:bg-cloud dark:hover:bg-fog"
|
||||||
onClick={handleFromTemplate}
|
onClick={handleFromTemplate}
|
||||||
data-testid="from-template-btn"
|
data-testid="from-template-btn"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user