Skip to content

Commit

Permalink
Updated Snackbar to use new Icon component and changed styling slight…
Browse files Browse the repository at this point in the history
…ly to keep things neat. Removed unused comments around app.
  • Loading branch information
Matthew Guest - Work authored and Matthew Guest - Work committed Jan 10, 2025
1 parent 9be6b43 commit 0423f0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VAMobile/src/components/BaseListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export enum ButtonDecoratorType {
/** Filled radio button decorator */
RadioFilled = 'RadioButtonChecked',
/** Disabled radio button decorator */
RadioDisabled = 'RadioDisabled', // no equivalent??
RadioDisabled = 'RadioDisabled',
/** Empty check box button decorator */
CheckBoxEmpty = 'CheckBoxOutlineBlank',
/** Filled check box button decorator */
Expand Down
1 change: 0 additions & 1 deletion VAMobile/src/components/ClickForActionLinkDeprecated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { FC } from 'react'
import { AccessibilityProps, TouchableWithoutFeedback, TouchableWithoutFeedbackProps } from 'react-native'

import { Icon } from '@department-of-veterans-affairs/mobile-component-library'
// useTheme
import { IconMap } from '@department-of-veterans-affairs/mobile-component-library/src/components/Icon/iconList'

import { useExternalLink, useTheme } from 'utils/hooks'
Expand Down
12 changes: 5 additions & 7 deletions VAMobile/src/components/SnackBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import { ToastProps } from 'react-native-toast-notifications/lib/typescript/toas

import { useFocusEffect } from '@react-navigation/native'

import { Icon, IconProps } from '@department-of-veterans-affairs/mobile-component-library'

import { Box, TextViewProps, VAScrollView } from 'components'
import { NAMESPACE } from 'constants/namespaces'
import { triggerHaptic } from 'utils/haptics'
import { useAccessibilityFocus, useTheme } from 'utils/hooks'

import { BoxProps } from './Box'
import TextView from './TextView'
import VAIcon, { VAIconProps } from './VAIcon'

export type SnackbarMessages = {
successMsg: string
Expand Down Expand Up @@ -118,18 +119,15 @@ const SnackBar: FC<ToastProps> = (toast) => {
toast.onHide()
}

const snackBarIconProps: VAIconProps = {
name: isError ? 'ExclamationTriangle' : 'CircleCheckMark',
const snackBarIconProps: IconProps = {
name: isError ? 'Warning' : 'CheckCircle',
fill: themeColor.icon.snackBarIcon,
fill2: 'transparent',
height: 18,
width: 18,
}

const iconWrapperBoxProps: BoxProps = {
mr: 8,
alignSelf: 'flex-start',
mt: 2,
}

const vibrate = (): void => {
Expand All @@ -148,7 +146,7 @@ const SnackBar: FC<ToastProps> = (toast) => {
<View accessible={true} accessibilityRole={'alert'} ref={focusRef}>
<Box {...messageContainerProps}>
<Box {...iconWrapperBoxProps}>
<VAIcon {...snackBarIconProps} />
<Icon {...snackBarIconProps} />
</Box>
<TextView {...messageProp}>{message}</TextView>
</Box>
Expand Down

0 comments on commit 0423f0f

Please sign in to comment.