Skip to content

Commit

Permalink
Merge pull request #351 from openstax/details-drawer-error-use-mantine
Browse files Browse the repository at this point in the history
Replace OffCanvas with drawer, Update study details layout
  • Loading branch information
chrisbendel authored Feb 21, 2024
2 parents bb32b28 + e515086 commit 552fa4e
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 216 deletions.
3 changes: 0 additions & 3 deletions frontend/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ export * from './ui-states'

export * from './incorrect-user'

export * from './off-canvas'

export * from './rewards-progress-bar'
export * from './banners-bar'
export * from './off-canvas'
export * from './navbar/navbar-logo-link'
export * from './navbar/top-navbar'
export * from './resource-links'
Expand Down
69 changes: 0 additions & 69 deletions frontend/src/components/off-canvas.tsx

This file was deleted.

13 changes: 4 additions & 9 deletions frontend/src/screens/analysis/researcher-faq.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
import { Box, React, styled, useState } from '@common';
import { Button, Icon, OffCanvas } from '@components';
import { Button, Icon } from '@components';
import FAQIcon from '@images/icons/faq.svg'
import { Drawer } from '@mantine/core';

const FAQButton = styled.img({
cursor: 'pointer',
height: 50,
width: 50,
})

const StyledOffCanvas = styled(OffCanvas)({
'.offcanvas-body': {
height: 'auto',
},
})

export const ResearcherFAQ: FC = () => {
const [show, setShow] = useState(false)

return (
<div>
<FAQButton src={FAQIcon} alt='faq-icon' onClick={() => setShow(true)} />
<StyledOffCanvas show={show} title='Help' onHide={() => setShow(false)}>
<Drawer opened={show} title='Help' onClose={() => setShow(false)} position='right'>
<AnalysisBasicsFAQ />
</StyledOffCanvas>
</Drawer>
</div>
)
}
Expand Down
Loading

0 comments on commit 552fa4e

Please sign in to comment.