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