Commit Graph

19 Commits

Author SHA1 Message Date
ellreka 037079af61 docs: rename class to className (#139) 2020-12-16 15:06:28 +01:00
Robin Malfait aab23c9077 feat: add render features + render strategy (#106)
* add unmount strategy to README (React)

* add unmount strategy to README (Vue)

* add different render features (React)

* use render features in Menu and Listbox (React)

* add different render features (Vue)

* use render features in Menu and Listbox (Vue)

* bump dependencies

* add ability to change the ref property using `refName`

Example use case:

```tsx
// Some components have this API with an `innerRef`. The suggested approach is to use
// `React.forwardRef` so that you get the actual `ref` value. However if you already have this
// `innerRef` API than we can use the `refName="innerRef"` to give the `ref` prop a good name. It
// defaults to `ref` so that it still works everywhere else.

function MyButton({ innerRef, ...props }) {
  return <button ref={innerRef} {...props} />
}

<Menu.Button as={MyButton} refName="innerRef" />
```

* small cleanup, move refs to props we control

* add tests for the render abstraction (Render)

+ use the unique __ symbol as a default value in the Props type for the
  omitable props.

* use render features in Transition (React)

* add/update Transition examples to also showcase the `unmount={false}` render strategy

* bump dependencies

* add example with nested unmount/hide transitions

* add unmount to Transition documentation
2020-10-18 15:34:05 +02:00
Robin Malfait 53776af89e docs: improve documentation (#91)
* format README's with Prettier

* hoist people list

otherwise the reference will never be the same when you select a new item. Alternative could be to put it in a ref or useMemo or something.

* make whitespace consistent
2020-10-12 13:58:54 +02:00
Robin Malfait a5089d07b1 feat: Add Transition events (#57)
* fix wrong class in tests

* add Transition event callbacks

* add Transition Modal example with Event callbacks

* update props table of Transition component
2020-10-08 15:30:10 +02:00
Tobias Reich c33fc2568f docs: fix variable name in README (#71)
Looks like an old variable that hasn't been renamed
2020-10-07 11:43:47 +02:00
Manaia Junior 738ae3a9dd docs: Update table of contents and fix code snippet of Listbox (#50) 2020-10-05 22:49:16 -04:00
Adam Wathan b761bd3203 docs: Update table of contents and other navigation 2020-10-05 21:45:24 -04:00
Adam Wathan d0720c27c5 docs: Add switch documentation 2020-10-05 21:41:26 -04:00
Adam Wathan a1fcf52443 docs: Fix mistake in docs 2020-10-05 15:44:16 -04:00
Adam Wathan a157039c37 docs: Update Listbox documentation for React and a bit of Vue 2020-10-05 15:30:18 -04:00
Adam Wathan 6ec1fa8bd3 docs: Update Codesandbox links for Listbox components 2020-10-05 14:40:30 -04:00
Robin Malfait 734830ea7b Listbox documentation (#28)
* run prettier on README

* add Listbox documentation
2020-10-05 14:35:25 -04:00
Bhanu Teja Pachipulusu 412cc950aa docs: fix typo in React README (#22) 2020-09-30 10:25:30 +02:00
Juan Luis Rojas León 46a33b2fbd docs(React): jsx wrapped in enclosing tags (@headlessui-react/readme.md) (#10) 2020-09-25 10:54:16 +02:00
Utkarsh Kukreti 6d6be636d3 docs(React): fix "Transition" link href in @headlessui-react readme (#9) 2020-09-25 10:51:37 +02:00
Nathan Jaremko 20ddb3e639 docs(React): improve documentation for Menu transitions (#7)
* Improve documentation for Menu transitions

* Update README.md
2020-09-25 10:49:56 +02:00
Adam Wathan b051f13d80 docs: Add demo links 2020-09-24 13:41:16 -04:00
Adam Wathan 4b0207ad71 docs: Document React Menu, tweak Transition and Vue docs to be consistent 2020-09-16 15:07:02 -04:00
Robin Malfait 8b546f054b setup @headlessui/react package 2020-09-16 18:20:49 +02:00