fix: nextui switch input width overflow (#437)

This commit is contained in:
Avan 2025-01-01 01:27:51 +08:00 committed by xishang0128
parent 7ab3810457
commit d0a6d515a1
4 changed files with 2096 additions and 2473 deletions

View File

@ -1,6 +1,6 @@
{
"name": "mihomo-party",
"version": "1.5.13",
"version": "1.5.12",
"description": "Mihomo Party",
"main": "./out/main/index.js",
"author": "mihomo-party-org",
@ -25,7 +25,8 @@
"dependencies": {
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^3.0.0",
"@mihomo-party/sysproxy": "^2.0.4",
"@mihomo-party/sysproxy": "^2.0.7",
"@nextui-org/react": "2.6.10",
"@types/crypto-js": "^4.2.2",
"adm-zip": "^0.5.16",
"axios": "^1.7.7",
@ -45,7 +46,6 @@
"@electron-toolkit/eslint-config-prettier": "^2.0.0",
"@electron-toolkit/eslint-config-ts": "^2.0.0",
"@electron-toolkit/tsconfig": "^1.0.1",
"@nextui-org/react": "^2.4.8",
"@types/adm-zip": "^0.5.6",
"@types/express": "^5.0.0",
"@types/node": "^22.9.0",

4556
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
.border-switch {
input[type='checkbox'] {
width: 100%;
}
}

View File

@ -1,5 +1,6 @@
import React from 'react'
import { cn, Switch, SwitchProps } from '@nextui-org/react'
import './border-switch.css'
interface SiderSwitchProps extends SwitchProps {
isShowBorder?: boolean
@ -10,6 +11,7 @@ const BorderSwitch: React.FC<SiderSwitchProps> = (props) => {
return (
<Switch
className="border-switch px-[8px]"
classNames={{
wrapper: cn('border-2', {
'border-transparent': !isShowBorder,