- Updated dependencies [21bcd4195]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- Updated dependencies [30b13adec]
- Updated dependencies [30b13adec]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- Updated dependencies [16dda633f]
- @leafygreen-ui/[email protected]
- Updated dependencies [0e4c5099b]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- 541e12e75: Updates builds to leverage Rollup tree shaking. (see
tools/build/config/rollup.config.mjs
) - Updated dependencies [541e12e75]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- 674d06888: LG-4399: Enable passing component
index
prop for SSR support
- e1955dd36: Fixes broken patch build
- Updated dependencies [e1955dd36]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- 53c67fba6: LG-4650: migrates from
yarn
topnpm
- Updated dependencies [53c67fba6]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- Updated dependencies [274d7e1a7]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]
- 409377e19: Adds missing
useHighlightContext
export
-
4c04aa0ee: Updates
useInitDescendants
signature to require a Context value, and return aProvider
component.Eliminates the need to destructure
descendants
anddispatch
from the hook's return value just to pass into the provider. Instead, the hook will construct a pre-populated provider unique to the Context value given.Note:
descendants
,dispatch
andgetDescendants
are still returned by the hook for use in the parent component if necessary.Before:
const MyDescendantContext = createDescendantsContext(); const { descendants, dispatch } = useInitDescendants(); return ( <DescendantsProvider context={MyDescendantContext} descendants={descendants} dispatch={dispatch} > <MyDescendantItem /> </DescendantsProvider> );
After:
const MyDescendantContext = createDescendantsContext(); const { Provider } = useInitDescendants(MyDescendantContext); return ( <Provider> <MyDescendantItem /> </Provider> );
- 4c04aa0ee: Adds Highlight management utilities.
useHighlight
: A hook to initialize the highlight state managementHighlightProvider
: A context provider for consuming the highlight state from descendant componentscreateHighlightContext
: Constructs a unique Context object in order to support nested contexts
- Updated dependencies [4c04aa0ee]
- @leafygreen-ui/[email protected]
- cfa830701: Adds & exports
getDescendantById
&getDescendantByIndex
utilities
- cfa830701: Updates Descendant index properties after inserting & removing to ensure the index of the Descendant object matches the index within the Descendants list
- 659aa9eed: Adds
getDescendants
accessor function, returned fromuseInitDescendants
. Use this method when referencing descendants from withing effects/callbacks where thedescendants
object may have updated, and could be stale.
- 15185af0: Imports Storybook utilities from
@lg-tools/storybook-utils
(previously imported from@leafygreen-ui/lib
) - 356a53fd: Update TS builds to use
[email protected]
- Updated dependencies [15185af0]
- Updated dependencies [356a53fd]
- @leafygreen-ui/[email protected]
- @leafygreen-ui/[email protected]