feat: Preferences view layout on mobile has been updated, and can be dismissed by swiping from the right

This commit is contained in:
Aman Harwara
2023-05-17 19:42:08 +05:30
parent 7b44224314
commit e5c580deab
18 changed files with 114 additions and 79 deletions

View File

@@ -1,6 +1,7 @@
import { FunctionComponent, ReactNode, useRef, useState } from 'react'
import { ArrowDownCheckmarkIcon } from '@standardnotes/icons'
import { Title } from '@/Components/Preferences/PreferencesComponents/Content'
import { classNames } from '@standardnotes/snjs'
type Props = {
title: string | JSX.Element
@@ -21,12 +22,7 @@ const AccordionItem: FunctionComponent<Props> = ({ title, className = '', childr
}}
>
<Title>{title}</Title>
<ArrowDownCheckmarkIcon
className="sn-accordion-arrow-icon"
width={20}
height={20}
data-is-expanded={isExpanded}
/>
<ArrowDownCheckmarkIcon className={classNames('h-5 w-5 text-info', isExpanded && 'rotate-180')} />
</div>
<div className={'accordion-contents-container cursor-auto'} data-is-expanded={isExpanded} ref={elementRef}>
{children}