-
Notifications
You must be signed in to change notification settings - Fork 555
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 #486 from coronasafe/develop
Minor Release v2.6.1
- Loading branch information
Showing
16 changed files
with
759 additions
and
177 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,49 @@ | ||
import React from 'react'; | ||
|
||
interface TabValue { | ||
value: number, | ||
label: string | ||
} | ||
interface TabChange { | ||
(value: number):void | ||
} | ||
interface NavTabsProps { | ||
active?: number; | ||
options?: TabValue[]; | ||
onChange: TabChange; | ||
} | ||
|
||
export default function NavTabs(props:NavTabsProps) { | ||
let {active, options, onChange} = props; | ||
return( | ||
<div> | ||
<div className="sm:hidden p-2"> | ||
<select | ||
className="mt-1 form-select block w-full pl-3 pr-10 py-2 text-base leading-6 border-gray-300 focus:outline-none focus:shadow-outline-blue focus:border-blue-300 sm:text-sm sm:leading-5 transition ease-in-out duration-150" | ||
value={active} | ||
onChange={e=>onChange(Number(e.target.value))} | ||
> | ||
{options?.map((option:TabValue) => | ||
<option value={option.value}>{option.label}</option> | ||
)} | ||
</select> | ||
</div> | ||
<div className="hidden sm:block"> | ||
<div className="border-b border-gray-200"> | ||
<nav className="-mb-px flex justify-around"> | ||
{options?.map((option:TabValue) => | ||
<button | ||
className={ option.value === active | ||
? "whitespace-no-wrap ml-8 py-4 px-1 border-b-2 border-indigo-500 font-medium text-sm leading-5 text-indigo-600 focus:outline-none focus:text-indigo-800 focus:border-indigo-700" | ||
: "whitespace-no-wrap py-4 px-1 border-b-2 border-transparent font-medium text-sm leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300" | ||
} | ||
onClick={_=>onChange(option.value)}> | ||
{option.label} | ||
</button>)} | ||
</nav> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
) | ||
} |
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,21 @@ | ||
/* TypeScript file generated from SlideOver.re by genType. */ | ||
/* eslint-disable import/first */ | ||
|
||
|
||
import * as React from 'react'; | ||
|
||
// tslint:disable-next-line:no-var-requires | ||
const SlideOverBS = require('./SlideOver.bs'); | ||
|
||
// tslint:disable-next-line:interface-over-type-literal | ||
export type Props = { | ||
readonly children: React.ReactNode; | ||
readonly setShow: (_1:boolean) => void; | ||
readonly show: boolean | ||
}; | ||
|
||
export const make: React.ComponentType<{ | ||
readonly children: React.ReactNode; | ||
readonly setShow: (_1:boolean) => void; | ||
readonly show: boolean | ||
}> = SlideOverBS.make; |
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,36 @@ | ||
let str = React.string; | ||
|
||
[@genType] | ||
[@react.component] | ||
let make = (~show, ~setShow, ~children) => { | ||
<Transition show={Some(show)} > | ||
<div className="inset-0 overflow-hidden fixed z-40"> | ||
<div className="absolute inset-0 overflow-hidden"> | ||
<Transition | ||
enter="ease-in-out duration-500" | ||
enterFrom="opacity-0" | ||
enterTo="opacity-100" | ||
leave="ease-in-out duration-500" | ||
leaveFrom="opacity-100" | ||
leaveTo="opacity-0" | ||
> | ||
<div className="absolute inset-0 bg-gray-500 bg-opacity-75 transition-opacity" onClick={_=>setShow(false)}></div> | ||
</Transition> | ||
<section className="absolute inset-y-0 max-w-full right-0 flex"> | ||
<Transition | ||
enter="transform transition ease-in-out duration-500 sm:duration-700" | ||
enterFrom="translate-x-full" | ||
enterTo="translate-x-0" | ||
leave="transform transition ease-in-out duration-500 sm:duration-700" | ||
leaveFrom="translate-x-0" | ||
leaveTo="translate-x-full" | ||
> | ||
<div className="w-screen max-w-sm"> | ||
children | ||
</div> | ||
</Transition> | ||
</section> | ||
</div> | ||
</div> | ||
</Transition>; | ||
} |
Oops, something went wrong.