fix(#2422): fixed layout in personal data

keep-around/cc91d24df882d8955828a02ec08ad17ae5199f02
Rakov Roman 4 years ago
parent 2120219e54
commit cc91d24df8
  1. 2
      src/features/AddCardForm/components/Form/index.tsx
  2. 2
      src/features/Combobox/index.tsx
  3. 2
      src/features/Common/Input/index.tsx
  4. 31
      src/features/Common/Input/styled.tsx

@ -60,7 +60,7 @@ export const AddCardFormInner = (props: Props) => {
} = props } = props
const { error: cardError } = useCardsStore() const { error: cardError } = useCardsStore()
const isUserAccountPage = useRouteMatch(PAGES.useraccount)?.path === '/useraccount' const isUserAccountPage = useRouteMatch(PAGES.useraccount)?.path === PAGES.useraccount
const { const {
address, address,

@ -56,7 +56,7 @@ export const Combobox = <T extends Option>(props: Props<T>) => {
toggle, toggle,
} = useCombobox(props) } = useCombobox(props)
const { translate } = useLexicsStore() const { translate } = useLexicsStore()
const isUserAccountPage = useRouteMatch(PAGES.useraccount)?.isExact || false const isUserAccountPage = useRouteMatch(PAGES.useraccount)?.path === PAGES.useraccount
return ( return (
<Column isUserAccountPage={isUserAccountPage} className={className}> <Column isUserAccountPage={isUserAccountPage} className={className}>

@ -62,7 +62,7 @@ export const Input = ({
wrapperWidth, wrapperWidth,
}: Props) => { }: Props) => {
const { translate } = useLexicsStore() const { translate } = useLexicsStore()
const isUserAccountPage = useRouteMatch(PAGES.useraccount)?.isExact || false const isUserAccountPage = useRouteMatch(PAGES.useraccount)?.path === PAGES.useraccount
return ( return (
<Column isUserAccountPage={isUserAccountPage} className={className}> <Column isUserAccountPage={isUserAccountPage} className={className}>

@ -51,21 +51,9 @@ export const LabelTitle = styled.p<TitleProps>`
width: ${({ labelWidth }) => (labelWidth ? `${labelWidth}px` : '')}; width: ${({ labelWidth }) => (labelWidth ? `${labelWidth}px` : '')};
min-width: ${({ labelWidth }) => (labelWidth ? `${labelWidth}px` : '')}; min-width: ${({ labelWidth }) => (labelWidth ? `${labelWidth}px` : '')};
@media ${devices.laptop} {
${({ isUserAccountPage }) => (!isUserAccountPage
? css`
`
: '')}
}
@media ${devices.tablet} { @media ${devices.tablet} {
font-size: 1.6rem; font-size: 1.6rem;
width: 9rem; width: 9rem;
${({ isUserAccountPage }) => (isUserAccountPage
? css`
display: none;
`
: '')}
} }
${isMobileDevice ${isMobileDevice
? css` ? css`
@ -142,28 +130,19 @@ type ColumnProps = {
export const Column = styled.div<ColumnProps>` export const Column = styled.div<ColumnProps>`
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
${({ isUserAccountPage }) => (isUserAccountPage
@media ${devices.laptop} {
${({ isUserAccountPage }) => (!isUserAccountPage
? css` ? css`
width: 100%; max-width: 560px;
` `
: '')} : '')}
}
@media ${devices.tablet} { @media ${devices.tablet} {
${({ isUserAccountPage }) => (isUserAccountPage ${({ isUserAccountPage }) => (isUserAccountPage
? css` ? css`
max-width: 415px; max-width: 100%;
` `
: css` : '')}
width: 100%;`)}
}
@media ${devices.mobile} {
width: 100%;
position: relative;
} }
${isMobileDevice ${isMobileDevice

Loading…
Cancel
Save