mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 13:31:32 +08:00
docs(AddAgentModal): add comment explaining modal button pattern
Add explanatory comment for combining Button and Modal components in Hero UI pattern to clarify focus management requirements
This commit is contained in:
parent
1e919a908f
commit
ba41d8021f
@ -220,6 +220,9 @@ export const AddAgentModal: React.FC = () => {
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
{/* NOTE: Hero UI Modal Pattern: Combine the Button and Modal components into a single
|
||||
encapsulated component. This is because the Modal component needs to bind the onOpen
|
||||
event handler to the Button for proper focus management. */}
|
||||
<Button onPress={onOpen} className="justify-start bg-transparent text-foreground-500 hover:bg-accent">
|
||||
<Plus size={16} style={{ marginRight: 4, flexShrink: 0 }} />
|
||||
{t('agent.add.title')}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user