refactor: rename withMenuFilter prop to showMenuFilter in SidebarMenu component
style: update text size and color in BookmarkDrawer and HistoryDrawer components
This commit is contained in:
@@ -68,8 +68,8 @@ export function BookmarkDrawer() {
|
|||||||
size="sm"
|
size="sm"
|
||||||
title={
|
title={
|
||||||
<Group gap="sm">
|
<Group gap="sm">
|
||||||
<Bookmark size={18} style={{ color: 'var(--mantine-color-dimmed)' }} />
|
<Bookmark size={18} style={{ color: 'var(--mantine-color-text)' }} />
|
||||||
<Text fw={600} size="sm">
|
<Text fw={600} size="lg">
|
||||||
{t('bookmark:title')}
|
{t('bookmark:title')}
|
||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ export function HistoryDrawer() {
|
|||||||
size="sm"
|
size="sm"
|
||||||
title={
|
title={
|
||||||
<Group gap="sm">
|
<Group gap="sm">
|
||||||
<History size={18} style={{ color: 'var(--mantine-color-dimmed)' }} />
|
<History size={18} style={{ color: 'var(--mantine-color-text)' }} />
|
||||||
<Text fw={600} size="sm">
|
<Text fw={600} size="lg">
|
||||||
{t('history:title')}
|
{t('history:title')}
|
||||||
</Text>
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ interface SidebarMenuProps {
|
|||||||
/** Whether to show the collapse/expand toggle button (desktop only) */
|
/** Whether to show the collapse/expand toggle button (desktop only) */
|
||||||
withToggle?: boolean;
|
withToggle?: boolean;
|
||||||
/** Whether to show the sticky menu filter input (default: true) */
|
/** Whether to show the sticky menu filter input (default: true) */
|
||||||
withMenuFilter?: boolean;
|
showMenuFilter?: boolean;
|
||||||
/** Whether to show the History button (default: true) */
|
/** Whether to show the History button (default: true) */
|
||||||
showHistory?: boolean;
|
showHistory?: boolean;
|
||||||
/** Whether to show the Bookmark button (default: true) */
|
/** Whether to show the Bookmark button (default: true) */
|
||||||
@@ -226,7 +226,7 @@ export const SidebarMenu = memo(function SidebarMenu({
|
|||||||
items,
|
items,
|
||||||
variantOverride,
|
variantOverride,
|
||||||
withToggle = false,
|
withToggle = false,
|
||||||
withMenuFilter = true,
|
showMenuFilter = true,
|
||||||
showHistory = true,
|
showHistory = true,
|
||||||
showBookmark = true,
|
showBookmark = true,
|
||||||
}: SidebarMenuProps) {
|
}: SidebarMenuProps) {
|
||||||
@@ -381,7 +381,7 @@ export const SidebarMenu = memo(function SidebarMenu({
|
|||||||
|
|
||||||
// -- Mini (Collapsed) Mode ------------------------------------------------
|
// -- Mini (Collapsed) Mode ------------------------------------------------
|
||||||
if (isMini) {
|
if (isMini) {
|
||||||
const hasTopSection = withMenuFilter || showHistory || showBookmark;
|
const hasTopSection = showMenuFilter || showHistory || showBookmark;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box h="100%" style={{ display: 'flex', flexDirection: 'column' }}>
|
<Box h="100%" style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
@@ -401,7 +401,7 @@ export const SidebarMenu = memo(function SidebarMenu({
|
|||||||
gap: '8px',
|
gap: '8px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{withMenuFilter && (
|
{showMenuFilter && (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="subtle"
|
variant="subtle"
|
||||||
size="md"
|
size="md"
|
||||||
@@ -469,7 +469,7 @@ export const SidebarMenu = memo(function SidebarMenu({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -- Expanded Mode --------------------------------------------------------
|
// -- Expanded Mode --------------------------------------------------------
|
||||||
const hasTopSection = withMenuFilter || showHistory || showBookmark;
|
const hasTopSection = showMenuFilter || showHistory || showBookmark;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box h="100%" style={{ display: 'flex', flexDirection: 'column' }}>
|
<Box h="100%" style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
@@ -488,7 +488,7 @@ export const SidebarMenu = memo(function SidebarMenu({
|
|||||||
gap: '12px',
|
gap: '12px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{withMenuFilter && (
|
{showMenuFilter && (
|
||||||
<Box style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>
|
<Box style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>
|
||||||
<TextInput
|
<TextInput
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
|
|||||||
Reference in New Issue
Block a user