-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #648 from WestpacGEL/620-design-system-docs-respon…
…sive-demo-page 620 design system docs responsive demo page
- Loading branch information
Showing
20 changed files
with
148 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...system/[...component]/components/content-tabs/components/responsive-modal-button/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { ResponsiveModal } from './responsive-modal.component'; | ||
export { type ResponsiveModalProps } from './responsive-modal.types'; |
44 changes: 44 additions & 0 deletions
44
...components/content-tabs/components/responsive-modal-button/responsive-modal.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
'use client'; | ||
|
||
import { Grid, GridItem, Modal } from '@westpac/ui'; | ||
import { DesktopIcon, GelIcon, PhoneIcon, TabletIcon } from '@westpac/ui/icon'; | ||
|
||
import { Container } from '@/app/design-system/components'; | ||
|
||
import { ResponsiveModalProps } from '.'; | ||
|
||
export function ResponsiveModal({ children, ...props }: ResponsiveModalProps) { | ||
return ( | ||
<Modal isDismissable className="bg-light" {...props}> | ||
<Modal.Body className="flex flex-1 flex-col"> | ||
<Container className="flex flex-1 flex-col pt-5"> | ||
<div className="flex justify-between"> | ||
<h2 className="typography-body-7 font-light sm:typography-body-6">Responsive Demo</h2> | ||
<GelIcon color="primary" size="xlarge" /> | ||
</div> | ||
<div className="relative mb-3 mt-4 flex justify-center"> | ||
<div className="absolute inset-x-0 top-2 flex h-4 w-full items-center justify-between before:h-full before:border-l before:border-l-text after:h-full after:border-l after:border-l-text"> | ||
<div className="flex-1 border-t border-t-text" /> | ||
</div> | ||
<div className="z-10 flex gap-2 rounded border border-text bg-white px-3 py-2"> | ||
<PhoneIcon className="opacity-100 xsl:opacity-50" /> | ||
<TabletIcon className="opacity-50 xsl:opacity-100 md:opacity-50" /> | ||
<TabletIcon className="rotate-90 opacity-50 md:opacity-100 lg:opacity-50" /> | ||
<DesktopIcon className="opacity-50 lg:opacity-100" /> | ||
</div> | ||
</div> | ||
<div className="relative flex-1 overflow-auto"> | ||
<div className="relative z-10">{children}</div> | ||
<div className="pointer-events-none absolute inset-0 touch-none"> | ||
<Grid className="absolute inset-0"> | ||
{new Array(12).fill(null).map((_, index) => ( | ||
<GridItem key={index} span={1} className="bg-text/5" /> | ||
))} | ||
</Grid> | ||
</div> | ||
</div> | ||
</Container> | ||
</Modal.Body> | ||
</Modal> | ||
); | ||
} |
3 changes: 3 additions & 0 deletions
3
...nt]/components/content-tabs/components/responsive-modal-button/responsive-modal.types.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { ModalProps } from '@westpac/ui'; | ||
|
||
export type ResponsiveModalProps = ModalProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ export type CodeProps = { | |
language?: string; | ||
live?: boolean; | ||
showCode?: boolean; | ||
showResponsiveDemo?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
apps/site/src/components/code/components/live-code/live-code.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
export type LiveCodeProps = { className?: string; enableLiveCode?: boolean; showCode?: boolean }; | ||
export type LiveCodeProps = { | ||
className?: string; | ||
enableLiveCode?: boolean; | ||
showCode?: boolean; | ||
showResponsiveDemo?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ts/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const styles = tv({ | ||
base: 'px-4 py-3', | ||
base: 'flex-1 overflow-auto px-4 py-3', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { type ModalBackdropProps, ModalDialogProps } from './components/index.js'; | ||
|
||
export type ModalProps = ModalBackdropProps & ModalDialogProps; | ||
export type ModalProps = ModalBackdropProps & ModalDialogProps & { fullscreen?: boolean }; |
fc1f940
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gel-next-site – ./apps/site
gel-next-site.vercel.app
gel-next-site-git-main-westpacgel.vercel.app
gel-next-site-westpacgel.vercel.app