diff --git a/packages/harmony/src/components/hint/Hint.tsx b/packages/harmony/src/components/hint/Hint.tsx index 7887ada0b11..9b12b748a5a 100644 --- a/packages/harmony/src/components/hint/Hint.tsx +++ b/packages/harmony/src/components/hint/Hint.tsx @@ -4,9 +4,10 @@ import type { IconComponent } from 'components/icon' import { Flex } from 'components/layout' import { Paper, PaperProps } from 'components/layout/Paper' import { Text } from 'components/text' +import { IconQuestionCircle } from 'icons' type HintProps = { - icon: IconComponent + icon?: IconComponent actions?: ReactNode } & PaperProps @@ -14,7 +15,7 @@ type HintProps = { * A way of informing the user of important details in line in a prominent way. */ export const Hint = (props: HintProps) => { - const { icon: Icon, children, actions, ...other } = props + const { icon: Icon = IconQuestionCircle, children, actions, ...other } = props return ( ({ - root: { - flexDirection: 'row', - alignItems: 'center', - gap: spacing(4), - paddingVertical: spacing(3), - paddingHorizontal: spacing(4), - borderWidth: 1, - borderColor: palette.neutralLight7, - borderRadius: spacing(2), - backgroundColor: palette.neutralLight9 - }, - text: { - flex: 1, - flexWrap: 'wrap', - lineHeight: 20 - } -})) - -type HelpCalloutProps = { - content: ReactNode - style?: ViewStyle - icon?: ComponentType - numberOfLines?: number -} - -/** - * @todo Rename to Hint - */ -export const HelpCallout = (props: HelpCalloutProps) => { - const { - style, - content, - icon: Icon = IconQuestionCircle, - numberOfLines - } = props - const styles = useStyles() - const neutral = useColor('neutral') - - return ( - - - {typeof content === 'string' ? ( - - {content} - - ) : ( - content - )} - - ) -} diff --git a/packages/mobile/src/components/leaving-audius-drawer/LeavingAudiusDrawer.tsx b/packages/mobile/src/components/leaving-audius-drawer/LeavingAudiusDrawer.tsx index ea2b4f9fdb4..7a5a7d13010 100644 --- a/packages/mobile/src/components/leaving-audius-drawer/LeavingAudiusDrawer.tsx +++ b/packages/mobile/src/components/leaving-audius-drawer/LeavingAudiusDrawer.tsx @@ -3,13 +3,11 @@ import React from 'react' import { useLeavingAudiusModal } from '@audius/common/store' import { View } from 'react-native' -import { IconExternalLink, IconInfo } from '@audius/harmony-native' +import { Hint, IconExternalLink, IconInfo } from '@audius/harmony-native' import { Button, Text, useLink } from 'app/components/core' import Drawer from 'app/components/drawer/Drawer' import { makeStyles } from 'app/styles' -import { HelpCallout } from '../help-callout/HelpCallout' - const messages = { title: 'Are You Sure?', content: 'This link is taking you to the following website', @@ -40,11 +38,7 @@ export const LeavingAudiusDrawer = () => { > {messages.content} - + {link}