refactor: 优化eslint配置,提升代码质量 (#1341)
* feat: 统一并标准化eslint * lint: napcat.webui * lint: napcat.webui * lint: napcat.core * build: fix * lint: napcat.webui * refactor: 重构eslint * Update README.md
This commit is contained in:
651 files changed
+37978
-37584
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Switch } from '@heroui/switch'
|
||||
import clsx from 'clsx'
|
||||
import React, { forwardRef } from 'react'
|
||||
import { Switch } from '@heroui/switch';
|
||||
import clsx from 'clsx';
|
||||
import React, { forwardRef } from 'react';
|
||||
|
||||
export interface SwitchCardProps {
|
||||
label?: string
|
||||
@@ -15,8 +15,8 @@ export interface SwitchCardProps {
|
||||
|
||||
const SwitchCard = forwardRef<HTMLInputElement, SwitchCardProps>(
|
||||
(props, ref) => {
|
||||
const { label, description, value, onValueChange, disabled } = props
|
||||
const selectString = value ? 'true' : 'false'
|
||||
const { label, description, value, onValueChange, disabled } = props;
|
||||
const selectString = value ? 'true' : 'false';
|
||||
|
||||
return (
|
||||
<Switch
|
||||
@@ -25,7 +25,7 @@ const SwitchCard = forwardRef<HTMLInputElement, SwitchCardProps>(
|
||||
'inline-flex flex-row-reverse w-full max-w-md bg-content1 hover:bg-content2 items-center',
|
||||
'justify-between cursor-pointer rounded-lg gap-2 p-3 border-2 border-transparent',
|
||||
'data-[selected=true]:border-primary bg-opacity-50 backdrop-blur-sm'
|
||||
)
|
||||
),
|
||||
}}
|
||||
{...props}
|
||||
ref={ref}
|
||||
@@ -34,15 +34,15 @@ const SwitchCard = forwardRef<HTMLInputElement, SwitchCardProps>(
|
||||
value={selectString}
|
||||
onValueChange={onValueChange}
|
||||
>
|
||||
<div className="flex flex-col gap-1">
|
||||
<p className="text-medium">{label}</p>
|
||||
<p className="text-tiny text-default-400">{description}</p>
|
||||
<div className='flex flex-col gap-1'>
|
||||
<p className='text-medium'>{label}</p>
|
||||
<p className='text-tiny text-default-400'>{description}</p>
|
||||
</div>
|
||||
</Switch>
|
||||
)
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
SwitchCard.displayName = 'SwitchCard'
|
||||
SwitchCard.displayName = 'SwitchCard';
|
||||
|
||||
export default SwitchCard
|
||||
export default SwitchCard;
|
||||
Reference in new issue
Block a user