chore: make Preferences' lint happy
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { $ } from 'mdui/jq'
|
||||
import { Switch } from 'mdui'
|
||||
import React from 'react'
|
||||
import useEventListener from '../useEventListener.ts'
|
||||
import { ListItem } from "mdui"
|
||||
|
||||
export default function Preference({ title, icon, disabled, description, ...props } = {
|
||||
disabled: false,
|
||||
}) {
|
||||
interface Args extends React.HTMLAttributes<ListItem> {
|
||||
title: string
|
||||
description?: string
|
||||
icon: string
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
export default function Preference({ title, icon, disabled, description, ...props }: Args) {
|
||||
// @ts-ignore: 为什么 ...props 要说参数不兼容呢?
|
||||
return <mdui-list-item disabled={disabled ? true : undefined} rounded icon={icon} {...props}>
|
||||
{title}
|
||||
{description && <span slot="description">{description}</span>}
|
||||
|
||||
Reference in New Issue
Block a user