Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade tailwind to v2 #1072

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
package-lock.json

# testing
/coverage
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Common/NavTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function NavTabs(props:NavTabsProps) {
<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"
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:ring-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))}
>
Expand All @@ -34,8 +34,8 @@ export default function NavTabs(props:NavTabsProps) {
{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"
? "whitespace-nowrap 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-nowrap 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}
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Common/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Pagination = (props: PaginationProps) => {
<button
disabled={disabled}
onClick={e => (handleChangePage(e, label.toLowerCase()))}
className={`${classes} -ml-px relative bg-white text-gray-600 hover:text-gray-800 hover:bg-gray-200 inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-300 focus:shadow-outline-green transition ease-in-out duration-150 ${!disabled ? 'cursor-pointer' : 'cursor-not-allowed'}`}>
className={`${classes} -ml-px relative bg-white text-gray-600 hover:text-gray-800 hover:bg-gray-200 inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-300 focus:ring-green transition ease-in-out duration-150 ${!disabled ? 'cursor-pointer' : 'cursor-not-allowed'}`}>
{label}
</button>
);
Expand All @@ -124,10 +124,10 @@ const Pagination = (props: PaginationProps) => {

<div className="mx-auto mb-4">
<div className="flex-1 flex justify-between sm:hidden">
<a onClick={e => (handleChangePage(e, 'prev'))} className="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:outline-none focus:shadow-outline-green focus:border-green-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
<a onClick={e => (handleChangePage(e, 'prev'))} className="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:outline-none focus:ring-green focus:border-green-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
Previous
</a>
<a onClick={e => (handleChangePage(e, 'next'))} className="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:outline-none focus:shadow-outline-green focus:border-green-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
<a onClick={e => (handleChangePage(e, 'next'))} className="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium rounded-md text-gray-700 bg-white hover:text-gray-500 focus:outline-none focus:ring-green focus:border-green-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150">
Next
</a>
</div>
Expand All @@ -140,7 +140,7 @@ const Pagination = (props: PaginationProps) => {
<button type="button"

key={`page_${pageNo}`}
className={`-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-300 focus:shadow-outline-green transition ease-in-out duration-150 ${currentPage === pageNo ? 'bg-green-500 text-white' : 'bg-white text-gray-600 hover:text-gray-800 hover:bg-gray-200'}`}
className={`-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 focus:outline-none focus:border-green-300 focus:ring-green transition ease-in-out duration-150 ${currentPage === pageNo ? 'bg-green-500 text-white' : 'bg-white text-gray-600 hover:text-gray-800 hover:bg-gray-200'}`}
onClick={e => goToPage(e, pageNo)}
>
{pageNo}
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Common/UserSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const UserSelect = (props: any) => {

<div className="relative">
<span className="inline-block w-full rounded-md shadow-sm">
<button onClick={_ => setIsExpanded(!isExpanded)} type="button" aria-haspopup="listbox" aria-expanded="true" aria-labelledby="listbox-label" className="cursor-default relative w-full rounded-md border border-gray-300 bg-white pl-3 pr-10 py-2 text-left focus:outline-none focus:shadow-outline-blue focus:border-blue-300 transition ease-in-out duration-150 sm:text-sm sm:leading-5">
<button onClick={_ => setIsExpanded(!isExpanded)} type="button" aria-haspopup="listbox" aria-expanded="true" aria-labelledby="listbox-label" className="cursor-default relative w-full rounded-md border border-gray-300 bg-white pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-blue focus:border-blue-300 transition ease-in-out duration-150 sm:text-sm sm:leading-5">
<div className="flex items-center justify-between">
<div className="space-x-3 flex items-center">
<span aria-label="Online"
Expand All @@ -67,7 +67,7 @@ export const UserSelect = (props: any) => {
</span>

{isExpanded && <div className="absolute mt-1 w-full rounded-md bg-white shadow-lg z-40">
<ul role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-item-3" className="max-h-60 rounded-md py-1 text-base leading-6 shadow-xs overflow-auto focus:outline-none sm:text-sm sm:leading-5">
<ul role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-item-3" className="max-h-60 rounded-md py-1 text-base leading-6 ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm sm:leading-5">
{
users.map((user: any) => {
return <li onClick={_ => { setIsExpanded(false); onSelect(user.id) }} id="listbox-item-0" role="option" className="text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9">
Expand Down
Loading