-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Simplify Generator controls #184
Conversation
import { CheckCircledIcon, DotsVerticalIcon } from '@radix-ui/react-icons' | ||
import { useGeneratorParams } from '../Generator.hooks' | ||
import { useNavigate } from 'react-router-dom' | ||
import { getRoutePath } from '@/routeMap' | ||
|
||
interface GeneratorControlsProps { | ||
onSave: () => void | ||
isDirty: boolean | ||
} | ||
|
||
export function GeneratorControls({ onSave, isDirty }: GeneratorControlsProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</Flex> | ||
|
||
<SortableRuleList rules={rules} onSwapRules={swapRules} /> | ||
<Flex py="3" px="6" align="center" direction="column" gap="3"> | ||
{rules.length === 0 ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<NewRuleMenu variant="solid" size="2" /> | ||
</> | ||
) : ( | ||
<NewRuleMenu /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const tooltip = hasError ? 'Invalid script. Please check your rules' : '' | ||
|
||
const handleDeleteGenerator = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a confirmation dialog. I'll add a reusable one in a separate PR - we'll need it in other views and the sidebar as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⌨️
No description provided.