diff --git a/src/components/Modal/ModalAppDetails/styled.tsx b/src/components/Modal/ModalAppDetails/styled.tsx index aea9c6c..be5c17b 100644 --- a/src/components/Modal/ModalAppDetails/styled.tsx +++ b/src/components/Modal/ModalAppDetails/styled.tsx @@ -1,4 +1,5 @@ -import { AppInputProps, Input } from '@/shared/Input/Input' +import { Input } from '@/shared/Input/Input' +import { AppInputProps } from '@/shared/Input/types' import { styled } from '@mui/material' import { forwardRef } from 'react' diff --git a/src/components/Modal/ModalImportKeys/ModalImportKeys.tsx b/src/components/Modal/ModalImportKeys/ModalImportKeys.tsx index d8e4dda..5d75193 100644 --- a/src/components/Modal/ModalImportKeys/ModalImportKeys.tsx +++ b/src/components/Modal/ModalImportKeys/ModalImportKeys.tsx @@ -18,6 +18,7 @@ import { DOMAIN } from '@/utils/consts' import { CheckmarkIcon } from '@/assets' import { getPublicKey, nip19 } from 'nostr-tools' import { LoadingSpinner } from '@/shared/LoadingSpinner/LoadingSpinner' +import { HeadingContainer } from './styled' const FORM_DEFAULT_VALUES = { username: '', @@ -150,14 +151,14 @@ export const ModalImportKeys = () => { return ( - + Import key Bring your existing Nostr keys to Nsec.app - + ( @@ -12,3 +12,14 @@ export const StyledAppLogo = styled((props) => ( display: 'grid', placeItems: 'center', })) + +export const HeadingContainer = styled((props: StackProps) => )(() => ({ + gap: '0.2rem', + padding: '0 1rem', + alignSelf: 'flex-start', + overflow: 'auto', + width: '100%', + '@media screen and (max-width: 320px)': { + padding: '0 0.75rem', + }, +})) diff --git a/src/components/ReloadBadge/ReloadBadge.tsx b/src/components/ReloadBadge/ReloadBadge.tsx index 549f3b0..acf5524 100644 --- a/src/components/ReloadBadge/ReloadBadge.tsx +++ b/src/components/ReloadBadge/ReloadBadge.tsx @@ -1,5 +1,5 @@ import { FC, memo, useCallback } from 'react' -import { Collapse, Stack, Typography } from '@mui/material' +import { Stack, Typography } from '@mui/material' import { StyledAlert, StyledReloadButton } from './styled' import { useSessionStorage } from 'usehooks-ts' import { RELOAD_STORAGE_KEY } from '@/utils/consts' @@ -10,16 +10,14 @@ type ReloadBadgeContentProps = { const ReloadBadgeContent: FC = memo(({ onReload }) => { return ( - - - - - New version available! - - Reload - - - + + + + New version available! + + Reload + + ) }) diff --git a/src/components/Warning/Warning.tsx b/src/components/Warning/Warning.tsx index 3fd7f89..eab0dd2 100644 --- a/src/components/Warning/Warning.tsx +++ b/src/components/Warning/Warning.tsx @@ -1,21 +1,27 @@ import { FC, ReactNode } from 'react' import { IconContainer, StyledContainer } from './styled' -import { BoxProps, Stack, Typography } from '@mui/material' +import { BoxProps, Typography } from '@mui/material' type WarningProps = { message?: string | ReactNode - hint?: string | ReactNode icon?: ReactNode } & BoxProps -export const Warning: FC = ({ hint, message, icon, ...restProps }) => { +export const Warning: FC = ({ message, icon, ...restProps }) => { + const renderMessage = () => { + if (typeof message === 'string') { + return ( + + {message} + + ) + } + return message + } return ( {icon && {icon}} - - {message} - {hint && {hint}} - + {renderMessage()} ) } diff --git a/src/components/Warning/styled.tsx b/src/components/Warning/styled.tsx index 3c19743..a574464 100644 --- a/src/components/Warning/styled.tsx +++ b/src/components/Warning/styled.tsx @@ -7,13 +7,14 @@ export const StyledContainer = styled((props: BoxProps) => )(( padding: '0.5rem', display: 'flex', alignItems: 'center', - gap: '1rem', + gap: '0.5rem', cursor: 'pointer', } }) export const IconContainer = styled((props: BoxProps) => )(() => ({ width: '40px', + minWidth: '40px', height: '40px', borderRadius: '50%', background: 'grey', diff --git a/src/layout/Layout.tsx b/src/layout/Layout.tsx index ab15bb4..288f863 100644 --- a/src/layout/Layout.tsx +++ b/src/layout/Layout.tsx @@ -27,11 +27,17 @@ const StyledContainer = styled((props: ContainerProps) => + + + + + + + {appName} {isAppNameExists && ( @@ -80,16 +82,19 @@ const AppPage = () => { {shortAppNpub} )} - + + - + + {connectedOn} - + + Disconnect