pl-fe: lint

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2024-12-05 17:16:43 +01:00
parent 4ff23c77e8
commit 329d4e89bd
151 changed files with 233 additions and 233 deletions

View File

@@ -8,7 +8,7 @@ interface IBackgroundShapes {
/** Gradient that appears in the background of the UI. */
const BackgroundShapes: React.FC<IBackgroundShapes> = ({ position = 'fixed' }) => (
<div className={clsx(position, 'black:hidden pointer-events-none inset-x-0 top-0 flex justify-center overflow-hidden')}>
<div className={clsx(position, 'pointer-events-none inset-x-0 top-0 flex justify-center overflow-hidden black:hidden')}>
<div className='bg-gradient-sm lg:bg-gradient-light lg:dark:bg-gradient-dark h-screen w-screen' />
</div>
);

View File

@@ -13,7 +13,7 @@ const ColumnForbidden = () => {
return (
<Column label={intl.formatMessage(messages.title)}>
<div className='bg-primary-50 flex min-h-[160px] flex-1 items-center justify-center rounded-lg p-10 text-center text-gray-900 dark:bg-gray-700 dark:text-gray-300'>
<div className='flex min-h-[160px] flex-1 items-center justify-center rounded-lg bg-primary-50 p-10 text-center text-gray-900 dark:bg-gray-700 dark:text-gray-300'>
{intl.formatMessage(messages.body)}
</div>
</Column>

View File

@@ -60,7 +60,7 @@ const CompareHistoryModal: React.FC<BaseModalProps & CompareHistoryModalProps> =
{poll.options.map((option: any) => (
<HStack alignItems='center' className='p-1 text-gray-900 dark:text-gray-300'>
<span
className='border-primary-600 mr-2.5 inline-block size-4 flex-none rounded-full border border-solid'
className='mr-2.5 inline-block size-4 flex-none rounded-full border border-solid border-primary-600'
tabIndex={0}
role='radio'
/>

View File

@@ -33,7 +33,7 @@ const DropdownMenuModal: React.FC<BaseModalProps & DropdownMenuModalProps> = ({
onClick={handleClickOutside}
>
<div
className={clsx('black:bg-black no-reduce-motion:transition-all dark:ring-primary-700 pointer-events-auto fixed inset-x-0 z-[1001] mx-auto max-h-[calc(100dvh-1rem)] w-[calc(100vw-2rem)] max-w-lg overflow-auto rounded-t-xl bg-white py-1 shadow-lg duration-200 ease-in-out focus:outline-none dark:bg-gray-900 dark:ring-2', {
className={clsx('pointer-events-auto fixed inset-x-0 z-[1001] mx-auto max-h-[calc(100dvh-1rem)] w-[calc(100vw-2rem)] max-w-lg overflow-auto rounded-t-xl bg-white py-1 shadow-lg duration-200 ease-in-out focus:outline-none black:bg-black no-reduce-motion:transition-all dark:bg-gray-900 dark:ring-2 dark:ring-primary-700', {
'bottom-0 opacity-100': !firstRender,
'no-reduce-motion:-bottom-32 no-reduce-motion:opacity-0': firstRender,
})}

View File

@@ -52,7 +52,7 @@ const EmojiPicker: React.FC<IEmojiPicker> = ({ emoji, emojiUrl, ...props }) => {
return (
<div className='relative'>
<button
className='focus:border-primary-500 focus:ring-primary-500 dark:focus:border-primary-500 dark:focus:ring-primary-500 mt-1 flex size-[38px] items-center justify-center rounded-md border border-solid border-gray-400 bg-white text-gray-900 ring-1 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:ring-gray-800'
className='mt-1 flex size-[38px] items-center justify-center rounded-md border border-solid border-gray-400 bg-white text-gray-900 ring-1 focus:border-primary-500 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 dark:ring-gray-800 dark:focus:border-primary-500 dark:focus:ring-primary-500'
ref={refs.setReference}
title={title}
aria-label={title}

View File

@@ -9,7 +9,7 @@ import { useLoggedIn } from 'pl-fe/hooks/use-logged-in';
import type { BaseModalProps } from '../modal-root';
const Hotkey: React.FC<{ children: React.ReactNode }> = ({ children }) => (
<kbd className='border-primary-200 bg-primary-50 rounded-md border border-solid px-1.5 py-1 font-sans text-xs dark:border-gray-700 dark:bg-gray-800'>
<kbd className='rounded-md border border-solid border-primary-200 bg-primary-50 px-1.5 py-1 font-sans text-xs dark:border-gray-700 dark:bg-gray-800'>
{children}
</kbd>
);

View File

@@ -48,12 +48,12 @@ const ConfirmationStep: React.FC<IConfirmationStep> = ({ group }) => {
<Stack space={3}>
<Stack>
<label
className='dark:sm:shadow-inset bg-primary-100 text-primary-500 dark:text-accent-blue relative h-24 w-full cursor-pointer overflow-hidden rounded-lg sm:h-36 sm:shadow dark:bg-gray-800'
className='dark:sm:shadow-inset relative h-24 w-full cursor-pointer overflow-hidden rounded-lg bg-primary-100 text-primary-500 dark:bg-gray-800 dark:text-accent-blue sm:h-36 sm:shadow'
>
{group.header && <img className='size-full object-cover' src={group.header} alt={group.header_description} />}
</label>
<label className='bg-primary-500 dark:ring-primary-900 z-[1] mx-auto -mt-10 cursor-pointer rounded-lg ring-2 ring-white'>
<label className='z-[1] mx-auto -mt-10 cursor-pointer rounded-lg bg-primary-500 ring-2 ring-white dark:ring-primary-900'>
{group.avatar && <Avatar src={group.avatar} alt={group.avatar_description} size={80} />}
</label>
</Stack>
@@ -62,7 +62,7 @@ const ConfirmationStep: React.FC<IConfirmationStep> = ({ group }) => {
<Text size='2xl' weight='bold' align='center'>{group.display_name}</Text>
<Text
size='md'
className='[&_a]:text-primary-600 [&_a]:dark:text-accent-blue mx-auto max-w-sm [&_a]:hover:underline'
className='mx-auto max-w-sm [&_a]:text-primary-600 [&_a]:hover:underline [&_a]:dark:text-accent-blue'
>
<ParsedContent html={group.note} emojis={group.emojis} />
</Text>

View File

@@ -21,7 +21,7 @@ const renderTermsOfServiceLink = (href: string) => (
<a
href={href}
target='_blank'
className='text-primary-600 hover:text-primary-800 dark:text-accent-blue dark:hover:text-accent-blue hover:underline'
className='text-primary-600 hover:text-primary-800 hover:underline dark:text-accent-blue dark:hover:text-accent-blue'
>
{termsOfServiceText}
</a>

View File

@@ -123,7 +123,7 @@ const ReasonStep: React.FC<IReasonStep> = ({ comment, setComment, ruleIds, setRu
value={rule.id}
checked={isSelected}
readOnly
className='text-primary-600 checked:bg-primary-500 focus:ring-primary-500 dark:checked:bg-primary-500 dark:focus:ring-primary-500 size-4 rounded border-2 border-gray-300 dark:border-gray-800 dark:bg-gray-900'
className='size-4 rounded border-2 border-gray-300 text-primary-600 checked:bg-primary-500 focus:ring-primary-500 dark:border-gray-800 dark:bg-gray-900 dark:checked:bg-primary-500 dark:focus:ring-primary-500'
/>
</button>
);

View File

@@ -114,7 +114,7 @@ const ProfileDropdown: React.FC<IProfileDropdown> = ({ account, children }) => {
component={ProfileDropdownMenu}
>
<button
className='focus:ring-primary-500 dark:focus:ring-primary-500 w-full rounded-lg focus:ring-2 focus:ring-offset-2 dark:ring-gray-800 dark:ring-offset-0'
className='w-full rounded-lg focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:ring-gray-800 dark:ring-offset-0 dark:focus:ring-primary-500'
type='button'
>
{children}
@@ -129,7 +129,7 @@ interface MenuItemProps {
}
const MenuItem: React.FC<MenuItemProps> = ({ className, menuItem }) => {
const baseClassName = clsx(className, 'focus:ring-primary-500 block w-full cursor-pointer truncate px-4 py-2.5 text-left text-sm text-gray-700 outline-none hover:bg-gray-100 focus:ring-2 focus:ring-offset-2 rtl:text-right dark:text-gray-500 dark:hover:bg-gray-800 dark:focus:ring-offset-0');
const baseClassName = clsx(className, 'block w-full cursor-pointer truncate px-4 py-2.5 text-left text-sm text-gray-700 outline-none hover:bg-gray-100 focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:text-gray-500 dark:hover:bg-gray-800 dark:focus:ring-offset-0 rtl:text-right');
if (menuItem.toggle) {
return (
@@ -140,7 +140,7 @@ const MenuItem: React.FC<MenuItemProps> = ({ className, menuItem }) => {
</div>
);
} else if (!menuItem.text) {
return <hr className='black:border-t mx-2 my-1 border-t-2 border-gray-100 dark:border-gray-800' />;
return <hr className='mx-2 my-1 border-t-2 border-gray-100 black:border-t dark:border-gray-800' />;
} else if (menuItem.action) {
return (
<button