chore: Fix lint errors in UI
This commit is contained in:
3 files changed
+6
-30
No files matched your search
@@ -64,7 +64,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
lint-www:
|
lint-www:
|
||||||
name: Lint - WWW & Deps
|
name: Lint - WWW
|
||||||
needs: build-configs
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -84,15 +84,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: config-artifacts
|
name: config-artifacts
|
||||||
path: packages
|
path: packages
|
||||||
- name: Lint STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl lint
|
|
||||||
- name: Lint UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui lint
|
|
||||||
- name: Lint WWW service
|
- name: Lint WWW service
|
||||||
run: pnpm --filter @ermnvldmr/www lint
|
run: pnpm --filter @ermnvldmr/www lint
|
||||||
|
|
||||||
typecheck-www:
|
typecheck-www:
|
||||||
name: Typecheck - WWW & Deps
|
name: Typecheck - WWW
|
||||||
needs: build-configs
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -112,10 +108,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: config-artifacts
|
name: config-artifacts
|
||||||
path: packages
|
path: packages
|
||||||
- name: Typecheck STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl typecheck
|
|
||||||
- name: Typecheck UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui typecheck
|
|
||||||
- name: Typecheck WWW service
|
- name: Typecheck WWW service
|
||||||
run: pnpm --filter @ermnvldmr/www typecheck
|
run: pnpm --filter @ermnvldmr/www typecheck
|
||||||
|
|
||||||
@@ -170,10 +162,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: config-artifacts
|
name: config-artifacts
|
||||||
path: packages
|
path: packages
|
||||||
- name: Test STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl test:coverage
|
|
||||||
- name: Test UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui test:coverage
|
|
||||||
- name: Test WWW service
|
- name: Test WWW service
|
||||||
run: pnpm --filter @ermnvldmr/www test:coverage
|
run: pnpm --filter @ermnvldmr/www test:coverage
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
lint-www:
|
lint-www:
|
||||||
name: Lint - WWW & Deps
|
name: Lint - WWW
|
||||||
needs: build-configs
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -90,15 +90,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: config-artifacts
|
name: config-artifacts
|
||||||
path: packages
|
path: packages
|
||||||
- name: Lint STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl lint
|
|
||||||
- name: Lint UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui lint
|
|
||||||
- name: Lint WWW service
|
- name: Lint WWW service
|
||||||
run: pnpm --filter @ermnvldmr/www lint
|
run: pnpm --filter @ermnvldmr/www lint
|
||||||
|
|
||||||
typecheck-www:
|
typecheck-www:
|
||||||
name: Typecheck - WWW & Deps
|
name: Typecheck - WWW
|
||||||
needs: build-configs
|
needs: build-configs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -118,10 +114,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: config-artifacts
|
name: config-artifacts
|
||||||
path: packages
|
path: packages
|
||||||
- name: Typecheck STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl typecheck
|
|
||||||
- name: Typecheck UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui typecheck
|
|
||||||
- name: Typecheck WWW service
|
- name: Typecheck WWW service
|
||||||
run: pnpm --filter @ermnvldmr/www typecheck
|
run: pnpm --filter @ermnvldmr/www typecheck
|
||||||
|
|
||||||
@@ -176,10 +168,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: config-artifacts
|
name: config-artifacts
|
||||||
path: packages
|
path: packages
|
||||||
- name: Test STL package
|
|
||||||
run: pnpm --filter @ermnvldmr/stl test:coverage
|
|
||||||
- name: Test UI package
|
|
||||||
run: pnpm --filter @ermnvldmr/ui test:coverage
|
|
||||||
- name: Test WWW service
|
- name: Test WWW service
|
||||||
run: pnpm --filter @ermnvldmr/www test:coverage
|
run: pnpm --filter @ermnvldmr/www test:coverage
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ export function Switch(props: SwitchProps): React.JSX.Element {
|
|||||||
</VisuallyHidden>
|
</VisuallyHidden>
|
||||||
<div
|
<div
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
style={getVariantStyles()}
|
|
||||||
className={cn(
|
className={cn(
|
||||||
'relative w-11 h-6 transition-all duration-200 ease-in-out rounded-full outline-none flex items-center',
|
'relative w-11 h-6 transition-all duration-200 ease-in-out rounded-full outline-none flex items-center',
|
||||||
!state.isSelected && (variant === 'solid' ? 'bg-[var(--rb-muted-base)]' : variant === 'outline' ? 'bg-transparent border-[var(--rb-muted-base)] border-2' : 'bg-transparent border-transparent'),
|
!state.isSelected && (variant === 'solid' ? 'bg-[var(--rb-muted-base)]' : variant === 'outline' ? 'bg-transparent border-[var(--rb-muted-base)] border-2' : 'bg-transparent border-transparent'),
|
||||||
@@ -141,15 +140,16 @@ export function Switch(props: SwitchProps): React.JSX.Element {
|
|||||||
isFocusVisible && 'ring-2 ring-offset-2 ring-[var(--rb-ring)]',
|
isFocusVisible && 'ring-2 ring-offset-2 ring-[var(--rb-ring)]',
|
||||||
props.isDisabled && 'grayscale-[0.5]'
|
props.isDisabled && 'grayscale-[0.5]'
|
||||||
)}
|
)}
|
||||||
|
style={getVariantStyles()}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={getThumbStyles()}
|
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-4 h-4 transition-all duration-200 ease-in-out transform rounded-full shadow-sm',
|
'w-4 h-4 transition-all duration-200 ease-in-out transform rounded-full shadow-sm',
|
||||||
!state.isSelected && 'bg-[var(--rb-text)]',
|
!state.isSelected && 'bg-[var(--rb-text)]',
|
||||||
variant === 'outline' ? 'ml-0.5' : 'ml-1',
|
variant === 'outline' ? 'ml-0.5' : 'ml-1',
|
||||||
state.isSelected ? (variant === 'outline' ? 'translate-x-4.5' : 'translate-x-5') : 'translate-x-0'
|
state.isSelected ? (variant === 'outline' ? 'translate-x-4.5' : 'translate-x-5') : 'translate-x-0'
|
||||||
)}
|
)}
|
||||||
|
style={getThumbStyles()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{children && (
|
{children && (
|
||||||
|
|||||||
Reference in new issue
Block a user