mirror of https://git.lenooby09.tech/LeNooby09/social-app.git

Add icons to drawer (#3956)

authored by

Eric Bailey and committed by
GitHub
cf981124 9f655224

+41 -55
+41 -55
src/view/shell/Drawer.tsx
··· 27 import {FEEDBACK_FORM_URL, HELP_DESK_URL} from 'lib/constants' 28 import {useNavigationTabState} from 'lib/hooks/useNavigationTabState' 29 import {usePalette} from 'lib/hooks/usePalette' 30 - import { 31 - BellIcon, 32 - BellIconSolid, 33 - CogIcon, 34 - HashtagIcon, 35 - HomeIcon, 36 - HomeIconSolid, 37 - ListIcon, 38 - MagnifyingGlassIcon2, 39 - MagnifyingGlassIcon2Solid, 40 - UserIcon, 41 - UserIconSolid, 42 - } from 'lib/icons' 43 import {getTabState, TabState} from 'lib/routes/helpers' 44 import {NavigationProp} from 'lib/routes/types' 45 import {colors, s} from 'lib/styles' ··· 50 import {Text} from 'view/com/util/text/Text' 51 import {UserAvatar} from 'view/com/util/UserAvatar' 52 import {useTheme as useAlfTheme} from '#/alf' 53 import {TextLink} from '../com/util/Link' 54 55 let DrawerProfileCard = ({ 56 account, ··· 370 <MenuItem 371 icon={ 372 isActive ? ( 373 - <MagnifyingGlassIcon2Solid 374 style={pal.text as StyleProp<ViewStyle>} 375 - size={24} 376 - strokeWidth={1.7} 377 /> 378 ) : ( 379 - <MagnifyingGlassIcon2 380 style={pal.text as StyleProp<ViewStyle>} 381 - size={24} 382 - strokeWidth={1.7} 383 /> 384 ) 385 } ··· 406 <MenuItem 407 icon={ 408 isActive ? ( 409 - <HomeIconSolid 410 style={pal.text as StyleProp<ViewStyle>} 411 - size="24" 412 - strokeWidth={3.25} 413 /> 414 ) : ( 415 - <HomeIcon 416 - style={pal.text as StyleProp<ViewStyle>} 417 - size="24" 418 - strokeWidth={3.25} 419 - /> 420 ) 421 } 422 label={_(msg`Home`)} ··· 443 <MenuItem 444 icon={ 445 isActive ? ( 446 - <BellIconSolid 447 style={pal.text as StyleProp<ViewStyle>} 448 - size="24" 449 - strokeWidth={1.7} 450 /> 451 ) : ( 452 - <BellIcon 453 - style={pal.text as StyleProp<ViewStyle>} 454 - size="24" 455 - strokeWidth={1.7} 456 - /> 457 ) 458 } 459 label={_(msg`Notifications`)} ··· 484 <MenuItem 485 icon={ 486 isActive ? ( 487 - <HashtagIcon 488 - strokeWidth={3} 489 style={pal.text as FontAwesomeIconStyle} 490 - size={24} 491 /> 492 ) : ( 493 - <HashtagIcon 494 - strokeWidth={2} 495 - style={pal.text as FontAwesomeIconStyle} 496 - size={24} 497 - /> 498 ) 499 } 500 label={_(msg`Feeds`)} ··· 512 const pal = usePalette('default') 513 return ( 514 <MenuItem 515 - icon={<ListIcon strokeWidth={2} style={pal.text} size={26} />} 516 label={_(msg`Lists`)} 517 accessibilityLabel={_(msg`Lists`)} 518 accessibilityHint="" ··· 535 <MenuItem 536 icon={ 537 isActive ? ( 538 - <UserIconSolid 539 style={pal.text as StyleProp<ViewStyle>} 540 - size="26" 541 - strokeWidth={1.5} 542 /> 543 ) : ( 544 - <UserIcon 545 style={pal.text as StyleProp<ViewStyle>} 546 - size="26" 547 - strokeWidth={1.5} 548 /> 549 ) 550 } ··· 563 return ( 564 <MenuItem 565 icon={ 566 - <CogIcon 567 - style={pal.text as StyleProp<ViewStyle>} 568 - size="26" 569 - strokeWidth={1.75} 570 - /> 571 } 572 label={_(msg`Settings`)} 573 accessibilityLabel={_(msg`Settings`)}
··· 27 import {FEEDBACK_FORM_URL, HELP_DESK_URL} from 'lib/constants' 28 import {useNavigationTabState} from 'lib/hooks/useNavigationTabState' 29 import {usePalette} from 'lib/hooks/usePalette' 30 import {getTabState, TabState} from 'lib/routes/helpers' 31 import {NavigationProp} from 'lib/routes/types' 32 import {colors, s} from 'lib/styles' ··· 37 import {Text} from 'view/com/util/text/Text' 38 import {UserAvatar} from 'view/com/util/UserAvatar' 39 import {useTheme as useAlfTheme} from '#/alf' 40 + import { 41 + Bell_Filled_Corner0_Rounded as BellFilled, 42 + Bell_Stroke2_Corner0_Rounded as Bell, 43 + } from '#/components/icons/Bell' 44 + import {BulletList_Stroke2_Corner0_Rounded as List} from '#/components/icons/BulletList' 45 + import { 46 + Hashtag_Filled_Corner0_Rounded as HashtagFilled, 47 + Hashtag_Stroke2_Corner0_Rounded as Hashtag, 48 + } from '#/components/icons/Hashtag' 49 + import { 50 + HomeOpen_Filled_Corner0_Rounded as HomeFilled, 51 + HomeOpen_Stoke2_Corner0_Rounded as Home, 52 + } from '#/components/icons/HomeOpen' 53 + import {MagnifyingGlass_Filled_Stroke2_Corner0_Rounded as MagnifyingGlassFilled} from '#/components/icons/MagnifyingGlass' 54 + import {MagnifyingGlass2_Stroke2_Corner0_Rounded as MagnifyingGlass} from '#/components/icons/MagnifyingGlass2' 55 + import {SettingsGear2_Stroke2_Corner0_Rounded as Settings} from '#/components/icons/SettingsGear2' 56 + import { 57 + UserCircle_Filled_Corner0_Rounded as UserCircleFilled, 58 + UserCircle_Stroke2_Corner0_Rounded as UserCircle, 59 + } from '#/components/icons/UserCircle' 60 import {TextLink} from '../com/util/Link' 61 + 62 + const iconWidth = 28 63 64 let DrawerProfileCard = ({ 65 account, ··· 379 <MenuItem 380 icon={ 381 isActive ? ( 382 + <MagnifyingGlassFilled 383 style={pal.text as StyleProp<ViewStyle>} 384 + width={iconWidth} 385 /> 386 ) : ( 387 + <MagnifyingGlass 388 style={pal.text as StyleProp<ViewStyle>} 389 + width={iconWidth} 390 /> 391 ) 392 } ··· 413 <MenuItem 414 icon={ 415 isActive ? ( 416 + <HomeFilled 417 style={pal.text as StyleProp<ViewStyle>} 418 + width={iconWidth} 419 /> 420 ) : ( 421 + <Home style={pal.text as StyleProp<ViewStyle>} width={iconWidth} /> 422 ) 423 } 424 label={_(msg`Home`)} ··· 445 <MenuItem 446 icon={ 447 isActive ? ( 448 + <BellFilled 449 style={pal.text as StyleProp<ViewStyle>} 450 + width={iconWidth} 451 /> 452 ) : ( 453 + <Bell style={pal.text as StyleProp<ViewStyle>} width={iconWidth} /> 454 ) 455 } 456 label={_(msg`Notifications`)} ··· 481 <MenuItem 482 icon={ 483 isActive ? ( 484 + <HashtagFilled 485 + width={iconWidth} 486 style={pal.text as FontAwesomeIconStyle} 487 /> 488 ) : ( 489 + <Hashtag width={iconWidth} style={pal.text as FontAwesomeIconStyle} /> 490 ) 491 } 492 label={_(msg`Feeds`)} ··· 504 const pal = usePalette('default') 505 return ( 506 <MenuItem 507 + icon={<List style={pal.text} width={iconWidth} />} 508 label={_(msg`Lists`)} 509 accessibilityLabel={_(msg`Lists`)} 510 accessibilityHint="" ··· 527 <MenuItem 528 icon={ 529 isActive ? ( 530 + <UserCircleFilled 531 style={pal.text as StyleProp<ViewStyle>} 532 + width={iconWidth} 533 /> 534 ) : ( 535 + <UserCircle 536 style={pal.text as StyleProp<ViewStyle>} 537 + width={iconWidth} 538 /> 539 ) 540 } ··· 553 return ( 554 <MenuItem 555 icon={ 556 + <Settings style={pal.text as StyleProp<ViewStyle>} width={iconWidth} /> 557 } 558 label={_(msg`Settings`)} 559 accessibilityLabel={_(msg`Settings`)}