-
Notifications
You must be signed in to change notification settings - Fork 18
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 #138 from sigp/unstable
v0.1.0-beta.1
- Loading branch information
Showing
51 changed files
with
3,792 additions
and
2,726 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Make the Siren App | ||
|
||
|
||
# Default rule | ||
# Builds the electron app and executes it | ||
build: | ||
yarn && yarn dev | ||
|
||
# Builds a development server | ||
dev: | ||
yarn && yarn start | ||
|
||
# Runs a docker production webserver | ||
docker: | ||
docker build -t siren . && docker run --rm -it --name siren -p 80:80 siren | ||
|
||
# Compile into a number of releases | ||
release: | ||
yarn && yarn build-all |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import Rodal from 'rodal' | ||
import React, { FC, ReactNode } from 'react' | ||
import { UiMode } from '../../constants/enums' | ||
import useMediaQuery from '../../hooks/useMediaQuery' | ||
import Button, { ButtonFace } from '../Button/Button' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
export interface DisclosureModalProps { | ||
isOpen: boolean | ||
backgroundImage: string | ||
onClose: () => void | ||
externalUrl?: string | ||
externalTarget?: '_self' | '_blank' | ||
mode?: UiMode | ||
children: ReactNode | ||
} | ||
|
||
const DisclosureModal: FC<DisclosureModalProps> = ({ | ||
isOpen, | ||
backgroundImage, | ||
mode, | ||
onClose, | ||
externalUrl, | ||
externalTarget, | ||
children, | ||
}) => { | ||
const { t } = useTranslation() | ||
const isTablet = useMediaQuery('(max-width: 1024px)') | ||
|
||
return ( | ||
<Rodal | ||
visible={isOpen} | ||
customStyles={{ | ||
backgroundColor: mode === UiMode.DARK ? '#1E1E1E' : 'white', | ||
width: '100%', | ||
maxWidth: isTablet ? '448px' : '949px', | ||
height: 'max-content', | ||
overflow: 'scroll', | ||
zIndex: 999, | ||
}} | ||
onClose={onClose} | ||
> | ||
<div className='w-full h-full flex'> | ||
<div | ||
className='hidden lg:block flex-shrink-0 w-80 bg-dark100' | ||
style={{ | ||
backgroundImage: `Url(${backgroundImage})`, | ||
backgroundSize: 'cover', | ||
backgroundPosition: 'center', | ||
}} | ||
/> | ||
<div className='p-10 flex flex-col justify-between'> | ||
<div>{children}</div> | ||
{externalUrl && ( | ||
<Button target={externalTarget} href={externalUrl} type={ButtonFace.SECONDARY}> | ||
{t('learnMore')} <i className='bi-arrow-right ml-2' /> | ||
</Button> | ||
)} | ||
</div> | ||
</div> | ||
</Rodal> | ||
) | ||
} | ||
|
||
export default DisclosureModal |
Oops, something went wrong.