Files
headlessui/packages/@headlessui-vue/src/index.test.ts
T
Robin Malfait 4942928db1 Improve transition naming (#331)
* rename Transition to TransitionRoot

This will allow us to write it as:

- TransitionRoot
- TransitionChild

This has the added benefit that it doesn't collide with the internal
Transition component from Vue itself.

* alias Transition.Root to Transition

This allows us to write:

- Transition.Root
- Transition.Child

If you have a standalone Transition, then you can still use <Transition /> as is.

* drop unusued import

* update changelog
2021-04-13 19:01:07 +02:00

64 lines
1.1 KiB
TypeScript

import * as HeadlessUI from './index'
/**
* Looks a bit of a silly test, however this ensures that we don't accidentally expose something to
* the outside world that we didn't want!
*/
it('should expose the correct components', () => {
expect(Object.keys(HeadlessUI)).toEqual([
// Dialog
'Dialog',
'DialogOverlay',
'DialogTitle',
'DialogDescription',
// Disclosure
'Disclosure',
'DisclosureButton',
'DisclosurePanel',
// FocusTrap
'FocusTrap',
// Listbox
'Listbox',
'ListboxLabel',
'ListboxButton',
'ListboxOptions',
'ListboxOption',
// Menu
'Menu',
'MenuButton',
'MenuItems',
'MenuItem',
// Popover
'Popover',
'PopoverButton',
'PopoverOverlay',
'PopoverPanel',
'PopoverGroup',
// Portal
'Portal',
'PortalGroup',
// RadioGroup
'RadioGroup',
'RadioGroupOption',
'RadioGroupLabel',
'RadioGroupDescription',
// Switch
'SwitchGroup',
'Switch',
'SwitchLabel',
'SwitchDescription',
// Transition
'TransitionChild',
'TransitionRoot',
])
})