Merge branch 'main' into eslint-overhaul

This commit is contained in:
Brendan Allan 2023-01-23 01:44:28 -08:00 committed by GitHub
commit ba6b417bd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 13 deletions

View file

@ -22,7 +22,8 @@
"prisma": "cd core && cargo prisma",
"codegen": "cargo test -p sd-core api::tests::test_and_export_rspc_bindings -- --exact",
"typecheck": "turbo run typecheck",
"lint": "turbo run lint"
"lint": "turbo run lint",
"clean": "rimraf node_modules/ **/node_modules/ target/ **/.build/ **/.next/ **/dist/**"
},
"pnpm": {
"overrides": {
@ -39,6 +40,7 @@
"lint-staged": "^13.1.0",
"markdown-link-check": "^3.10.3",
"prettier": "^2.8.3",
"rimraf": "^4.1.1",
"turbo": "^1.5.5",
"turbo-ignore": "^0.3.0",
"typescript": "^4.9.4"

View file

@ -45,15 +45,18 @@ export const Item = ({ to, className, icon: Icon, children, ...props }: Dropdown
<span className="text-left">{children}</span>
</>
);
return to ? (
<Link {...props} to={to} className={clsx(itemStyles(props), className)}>
{content}
</Link>
) : (
<button {...props} className={clsx(itemStyles(props), className)}>
{content}
</button>
return (
<Menu.Item>
{to ? (
<Link {...props} to={to} className={clsx(itemStyles(props), className)}>
{content}
</Link>
) : (
<button {...props} className={clsx(itemStyles(props), className)}>
{content}
</button>
)}
</Menu.Item>
);
};

View file

@ -4,7 +4,9 @@ import { forwardRef } from 'react';
export interface SwitchProps
extends VariantProps<typeof switchStyles>,
SwitchPrimitive.SwitchProps {}
SwitchPrimitive.SwitchProps {
thumbClassName?: string;
}
const switchStyles = cva(
[
@ -46,9 +48,9 @@ const thumbStyles = cva(
);
export const Switch = forwardRef<HTMLButtonElement, SwitchProps>(
({ size, className, ...props }, ref) => (
({ size, className, thumbClassName, ...props }, ref) => (
<SwitchPrimitive.Root {...props} ref={ref} className={switchStyles({ size, className })}>
<SwitchPrimitive.Thumb className={thumbStyles({ size, className })} />
<SwitchPrimitive.Thumb className={thumbStyles({ size, className: thumbClassName })} />
</SwitchPrimitive.Root>
)
);

View file

@ -16,6 +16,7 @@ importers:
lint-staged: ^13.1.0
markdown-link-check: ^3.10.3
prettier: ^2.8.3
rimraf: ^4.1.1
turbo: ^1.5.5
turbo-ignore: ^0.3.0
typescript: ^4.9.4
@ -29,6 +30,7 @@ importers:
lint-staged: 13.1.0
markdown-link-check: 3.10.3
prettier: 2.8.3
rimraf: 4.1.1
turbo: 1.7.0
turbo-ignore: 0.3.0
typescript: 4.9.4
@ -18168,6 +18170,12 @@ packages:
dependencies:
glob: 7.2.3
/rimraf/4.1.1:
resolution: {integrity: sha512-Z4Y81w8atcvaJuJuBB88VpADRH66okZAuEm+Jtaufa+s7rZmIz+Hik2G53kGaNytE7lsfXyWktTmfVz0H9xuDg==}
engines: {node: '>=14'}
hasBin: true
dev: true
/ripemd160/2.0.2:
resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==}
dependencies: