|
@@ -1,4 +1,4 @@
|
|
|
-import React, { useState } from 'react';
|
|
|
|
|
|
|
+import React from 'react';
|
|
|
|
|
|
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
import {
|
|
import {
|
|
@@ -9,23 +9,21 @@ import { useAiAssistantManagementModal } from '../../../stores/ai-assistant';
|
|
|
|
|
|
|
|
import { AiAssistantManagementHeader } from './AiAssistantManagementHeader';
|
|
import { AiAssistantManagementHeader } from './AiAssistantManagementHeader';
|
|
|
|
|
|
|
|
|
|
+import styles from './AiAssistantManagementPageSelectionMethod.module.scss';
|
|
|
|
|
+
|
|
|
|
|
+const moduleClass = styles['grw-ai-assistant-management-page-selection-method'] ?? '';
|
|
|
|
|
|
|
|
const SelectionButton = (props: { icon: string, label: string, onClick: () => void }): JSX.Element => {
|
|
const SelectionButton = (props: { icon: string, label: string, onClick: () => void }): JSX.Element => {
|
|
|
const { icon, label, onClick } = props;
|
|
const { icon, label, onClick } = props;
|
|
|
- const [isHovered, setIsHovered] = useState(false);
|
|
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
- className={`btn p-4 text-center ${isHovered ? 'btn-outline-primary' : 'btn-outline-secondary'}`}
|
|
|
|
|
- style={{ width: '280px' }}
|
|
|
|
|
- onMouseEnter={() => setIsHovered(true)}
|
|
|
|
|
- onMouseLeave={() => setIsHovered(false)}
|
|
|
|
|
|
|
+ className="btn p-4 text-center page-selection-method-btn"
|
|
|
onClick={onClick}
|
|
onClick={onClick}
|
|
|
>
|
|
>
|
|
|
<span
|
|
<span
|
|
|
- className="material-symbols-outlined d-block mb-3"
|
|
|
|
|
- style={{ fontSize: '48px' }}
|
|
|
|
|
|
|
+ className="material-symbols-outlined d-block mb-3 fs-1"
|
|
|
>
|
|
>
|
|
|
{icon}
|
|
{icon}
|
|
|
</span>
|
|
</span>
|
|
@@ -41,7 +39,7 @@ export const AiAssistantManagementPageSelectionMethod = (): JSX.Element => {
|
|
|
const isNewAiAssistant = aiAssistantManagementModalData?.aiAssistantData == null;
|
|
const isNewAiAssistant = aiAssistantManagementModalData?.aiAssistantData == null;
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <>
|
|
|
|
|
|
|
+ <div className={moduleClass}>
|
|
|
<AiAssistantManagementHeader
|
|
<AiAssistantManagementHeader
|
|
|
hideBackButton={isNewAiAssistant}
|
|
hideBackButton={isNewAiAssistant}
|
|
|
labelTranslationKey={isNewAiAssistant ? 'modal_ai_assistant.header.add_new_assistant' : 'modal_ai_assistant.header.update_assistant'}
|
|
labelTranslationKey={isNewAiAssistant ? 'modal_ai_assistant.header.add_new_assistant' : 'modal_ai_assistant.header.update_assistant'}
|
|
@@ -61,6 +59,6 @@ export const AiAssistantManagementPageSelectionMethod = (): JSX.Element => {
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</ModalBody>
|
|
</ModalBody>
|
|
|
- </>
|
|
|
|
|
|
|
+ </div>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|