Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbykumar706584 committed Oct 2, 2023
1 parent 3c580c5 commit ff5306f
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 242 deletions.
14 changes: 7 additions & 7 deletions renderer/src/components/Login/LeftLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ const LeftLogin = () => {
id="view-more"
className={`
${isOpen ? '' : 'text-opacity-90'
} text-white bg-black w-48 text-xs lg:w-72 sm:w-52 py-[12px] flex items-center justify-center text-md font-bold rounded-b-[10px] sm:text-sm`}
} text-white bg-black w-48 text-xs lg:w-72 sm:w-52 py-[12px] flex items-center justify-center text-md font-bold rounded-b-[10px] sm:text-sm`}
>
View More
</button>
</div>
)}
)}
<Transition
appear
show={isOpen}
Expand Down Expand Up @@ -262,8 +262,8 @@ const LeftLogin = () => {
<Tab
id="archived-tab"
className={({ selected }) => classNames(
'w-full text-md items-center justify-center outline-none font-bold py-4 leading-5 rounded-t-lg',
selected
'w-full text-md items-center justify-center outline-none font-bold py-4 leading-5 rounded-t-lg',
selected
? ' text-error bg-gray-200 '
: 'text-gray-400 hover:text-gray-500 border-b bg-white ',
)}
Expand Down Expand Up @@ -292,7 +292,7 @@ const LeftLogin = () => {
<TrashIcon className="text-gray-500 h-5 w-5" />
</button>
</div>
))}
))}
</div>
</Tab.Panel>
<Tab.Panel className="relative overflow-y-auto h-[60vh] p-5 ">
Expand All @@ -313,7 +313,7 @@ const LeftLogin = () => {
</button>

</div>
))}
))}
</div>
</Tab.Panel>
</Tab.Panels>
Expand Down Expand Up @@ -386,7 +386,7 @@ const LeftLogin = () => {
</div>
{newOpen && (
<span id="show-error" className="text-red-500">{text}</span>
)}
)}
<div className="mt-8 flex gap-8 justify-end">
<button
type="button"
Expand Down
16 changes: 8 additions & 8 deletions renderer/src/components/Profile/UserProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ const UserProfile = (_username) => {
id="profile"
aria-label="user-profile"
className={classNames(
active ? 'bg-gray-100' : '',
'block px-4 py-2 text-sm text-gray-700',
)}
active ? 'bg-gray-100' : '',
'block px-4 py-2 text-sm text-gray-700',
)}
>

{item}

</Link>
)
)
)}
</Menu.Item>
))}
Expand All @@ -102,15 +102,15 @@ const UserProfile = (_username) => {
role="button"
tabIndex={0}
className={classNames(
active ? 'bg-gray-100' : '',
'block px-4 py-2 text-sm text-gray-700',
)}
active ? 'bg-gray-100' : '',
'block px-4 py-2 text-sm text-gray-700',
)}
>

{t('btn-signout')}

</Link>
)
)

)}
</Menu.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,26 @@ const CustomCanonSpecification = ({ bibleNav, closeBibleNav, handleNav }) => {
>
{t('btn-ok')}
</button>
)
: (
<>
<button
type="button"
className="w-40 h-10 bg-error leading-loose rounded shadow text-xs font-base text-white tracking-wide font-light uppercase"
onClick={() => closeBibleNav()}
>
{t('btn-cancel')}
</button>
<button
type="button"
id="save-canon"
className="w-40 h-10 bg-success leading-loose rounded shadow text-xs font-base text-white tracking-wide font-light uppercase"
onClick={() => (handleNav === 'edit' ? editCanon() : saveCanon())}
>
{t('btn-save')}
</button>
</>
)}
)
: (
<>
<button
type="button"
className="w-40 h-10 bg-error leading-loose rounded shadow text-xs font-base text-white tracking-wide font-light uppercase"
onClick={() => closeBibleNav()}
>
{t('btn-cancel')}
</button>
<button
type="button"
id="save-canon"
className="w-40 h-10 bg-success leading-loose rounded shadow text-xs font-base text-white tracking-wide font-light uppercase"
onClick={() => (handleNav === 'edit' ? editCanon() : saveCanon())}
>
{t('btn-save')}
</button>
</>
)}
</div>
</div>
</div>
Expand Down
104 changes: 52 additions & 52 deletions renderer/src/components/Resources/ResourceUtils/CustomMultiComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,71 +24,71 @@ function CustomMultiComboBox({
}

return (
customData.length > 1 ? (
<Combobox value={selectedList} onChange={setSelectedList} multiple={multiSelect}>
{({ open }) => (
<div className="relative">
<div className="relative flex w-full border border-gray-200 cursor-default overflow-hidden rounded-lg bg-white text-left shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300 sm:text-sm">
customData.length > 1 ? (
<Combobox value={selectedList} onChange={setSelectedList} multiple={multiSelect}>
{({ open }) => (
<div className="relative">
<div className="relative flex w-full border border-gray-200 cursor-default overflow-hidden rounded-lg bg-white text-left shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300 sm:text-sm">

<Combobox.Input
className="w-full border-none py-2 pl-3 pr-10 text-sm leading-5 text-gray-900 focus:ring-0"
// displayValue={(language) => language?.ang}
displayValue={(selectedList) => `${selectedList.length > 0 ? `${selectedList[0][filterParams]}${multiSelect ? '... click for more' : '' }` : ''}`}
placeholder={placeholder === 'Select Language' ? t('label-lang') : ''}
onFocus={() => !open && setIsActive(true)}
onBlur={() => setIsActive(false)}
onChange={(event) => setQuery(event.target.value)}
aria-label="custom-dropdown"
/>
{dropArrow && (
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon
className="h-5 w-5 text-gray-400"
aria-hidden="true"
/>
</Combobox.Button>
)}
</div>
<Combobox.Input
className="w-full border-none py-2 pl-3 pr-10 text-sm leading-5 text-gray-900 focus:ring-0"
// displayValue={(language) => language?.ang}
displayValue={(selectedList) => `${selectedList.length > 0 ? `${selectedList[0][filterParams]}${multiSelect ? '... click for more' : ''}` : ''}`}
placeholder={placeholder === 'Select Language' ? t('label-lang') : ''}
onFocus={() => !open && setIsActive(true)}
onBlur={() => setIsActive(false)}
onChange={(event) => setQuery(event.target.value)}
aria-label="custom-dropdown"
/>
{dropArrow && (
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon
className="h-5 w-5 text-gray-400"
aria-hidden="true"
/>
</Combobox.Button>
)}
</div>

<Combobox.Options className="absolute w-full z-40 mt-1 max-h-48 scrollbars-width overflow-auto rounded-md bg-white py-1 px-2 text-base shadow-sm ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm cursor-pointer">
<div className="flex-col">
<div>
{selectedList.length > 0 && !query.length > 0 && <div className="mt-1 mb-2 h-[.1rem] w-full bg-secondary" />}
{filteredData.length > 0
<Combobox.Options className="absolute w-full z-40 mt-1 max-h-48 scrollbars-width overflow-auto rounded-md bg-white py-1 px-2 text-base shadow-sm ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm cursor-pointer">
<div className="flex-col">
<div>
{selectedList.length > 0 && !query.length > 0 && <div className="mt-1 mb-2 h-[.1rem] w-full bg-secondary" />}
{filteredData.length > 0
? filteredData.map((data) => (
// <Combobox.Option key={data?.id || data?.pk} className={`${selectedList.includes(data) ? 'bg-gray-400' : ''} hover:bg-gray-300 p-1`} value={data}>
<Combobox.Option key={data?.id || data?.pk} className=" hover:bg-gray-300 p-1" value={data} aria-label={data[filterParams]}>
{data[filterParams] }
{data[filterParams]}
{' '}
{showLangCode.show && (
<span className="text-green-600">
(
{data[showLangCode.langkey]}
)
</span>
<span className="text-green-600">
(
{data[showLangCode.langkey]}
)
</span>
)}
</Combobox.Option>
)) : query?.length > 2 && <Combobox.Option> No Match Found </Combobox.Option>}
</div>
</div>
</Combobox.Options>
{/* selected list */}
</div>
)}
</Combobox>
) : (
// only one item in dropdown
<div className="relative">
<div className="relative w-full border border-gray-200 cursor-default overflow-hidden rounded-lg bg-white text-left shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300 sm:text-sm">
<input
type="text"
value={customData[0][filterParams]}
disabled
className="w-full border-none py-2 pl-3 pr-10 text-sm leading-5 bg-gray-100 text-gray-900 focus:ring-0"
/>
</div>
</Combobox.Options>
{/* selected list */}
</div>
)}
</Combobox>
) : (
// only one item in dropdown
<div className="relative">
<div className="relative w-full border border-gray-200 cursor-default overflow-hidden rounded-lg bg-white text-left shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-teal-300 sm:text-sm">
<input
type="text"
value={customData[0][filterParams]}
disabled
className="w-full border-none py-2 pl-3 pr-10 text-sm leading-5 bg-gray-100 text-gray-900 focus:ring-0"
/>
</div>
)
</div>
)
);
}

Expand Down
Loading

0 comments on commit ff5306f

Please sign in to comment.