Add a little compact mode to the switch

This commit is contained in:
shamoon
2026-09-08 12:07:48 -07:00
parent 4fb6182b41
commit d66c681aae
3 changed files with 18 additions and 5 deletions
@@ -48,4 +48,14 @@ describe('SwitchComponent', () => {
component.value = undefined
expect(component.isUnset).toBeTruthy()
})
it('should support a compact layout', () => {
component.compact = true
component.title = 'Test switch'
fixture.detectChanges()
expect(fixture.nativeElement.querySelector('.mb-3')).toBeNull()
expect(fixture.nativeElement.querySelector('.row')).toBeNull()
expect(input.getAttribute('aria-label')).toEqual('Test switch')
})
})