mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix: nextui switch input width overflow (#437)
This commit is contained in:
parent
c7e252d418
commit
7d70008148
@ -26,6 +26,7 @@
|
||||
"@electron-toolkit/preload": "^3.0.1",
|
||||
"@electron-toolkit/utils": "^3.0.0",
|
||||
"@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",
|
||||
|
||||
4490
pnpm-lock.yaml
generated
4490
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
5
src/renderer/src/components/base/border-switch.css
Normal file
5
src/renderer/src/components/base/border-switch.css
Normal file
@ -0,0 +1,5 @@
|
||||
.border-switch {
|
||||
input[type='checkbox'] {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user