Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions packages/module/src/ChatbotHeader/ChatbotHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,39 +70,6 @@
}
}

// ============================================================================
// Toggle Options
// ============================================================================
.pf-chatbot__button--toggle-options,
.pf-chatbot__button--toggle-menu {
width: 3rem;
height: 3rem;
border-radius: var(--pf-t--global--border--radius--pill);
align-items: center;
justify-content: center;

&::before {
border-radius: inherit;
}

.pf-v6-c-button__icon,
.pf-v6-c-menu-toggle__icon {
display: flex;
align-items: center;
justify-content: center;
}

// Interactive states
&:hover,
&:focus {
.pf-v6-c-button__icon,
.pf-v6-c-menu-toggle__icon,
.pf-v6-c-icon__content {
color: var(--pf-t--global--icon--color--regular);
}
}
}

// ============================================================================
// Examples
// ============================================================================
Expand Down Expand Up @@ -134,12 +101,6 @@
}
}

.pf-v6-c-menu-toggle.pf-chatbot__button--toggle-options.pf-m-compact,
.pf-chatbot__button--toggle-menu.pf-m-compact {
width: 2rem;
height: 2rem;
}

.pf-chatbot__header .pf-chatbot__actions .pf-v6-c-menu-toggle.pf-m-secondary.pf-m-compact {
width: initial;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,4 @@ describe('ChatbotHeaderCloseButton', () => {
fireEvent.click(screen.getByRole('button', { name: 'Close' }));
expect(onClick).toHaveBeenCalled();
});

it('should render button with isCompact', () => {
render(<ChatbotHeaderCloseButton data-testid="close-button" onClick={jest.fn()} isCompact />);
expect(screen.getByTestId('close-button')).toHaveClass('pf-m-compact');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ const ChatbotHeaderCloseButtonBase: FunctionComponent<ChatbotHeaderCloseButtonPr
{...tooltipProps}
>
<Button
className={`pf-chatbot__button--toggle-menu ${isCompact ? 'pf-m-compact' : ''}`}
variant="plain"
onClick={onClick}
aria-label={menuAriaLabel}
ref={innerRef}
icon={
<Icon size={isCompact ? 'lg' : 'xl'} isInline>
<Icon>
<RhMicronsCloseIcon />
</Icon>
}
size={isCompact ? 'sm' : undefined}
isCircle
{...props}
/>
</Tooltip>
Expand Down
3 changes: 2 additions & 1 deletion packages/module/src/ChatbotHeader/ChatbotHeaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ const ChatbotHeaderMenuBase: FunctionComponent<ChatbotHeaderMenuProps> = ({
aria-label={menuAriaLabel}
ref={innerRef ?? buttonRef}
icon={
<Icon size={isCompact ? 'lg' : 'xl'} isInline>
<Icon>
<RhUiMenuBarsIcon />
</Icon>
}
size={isCompact ? 'sm' : undefined}
{...props}
isCircle
/>
),
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ export const ChatbotHeaderOptionsDropdown: FunctionComponent<ChatbotHeaderOption
aria-label={menuToggleAriaLabel}
ref={toggleRef}
icon={
<Icon size={isCompact ? 'lg' : 'xl'} isInline>
<Icon>
<RhUiEllipsisHorizontalFillIcon />
</Icon>
}
isExpanded={isOptionsMenuOpen}
onClick={() => setIsOptionsMenuOpen(!isOptionsMenuOpen)}
size={isCompact ? 'sm' : undefined}
isCircle
{...toggleProps}
/>
</Tooltip>
Expand Down
Loading