mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
rename deprecated Tabs to DocsTabs
This commit is contained in:
3 files changed
+10
-10
No files matched your search
@@ -1,15 +1,15 @@
|
||||
'use client'
|
||||
|
||||
import { useCallback, type ComponentPropsWithoutRef, type PropsWithChildren } from 'react'
|
||||
import { Tabs as TabsPrimitive, type TabsProps } from 'ui'
|
||||
import { withQueryParams, withSticky, type QueryParamsProps } from 'ui-patterns/ComplexTabs'
|
||||
import { useTocRerenderTrigger } from '~/features/docs/GuidesMdx.state'
|
||||
import { useCallback, type ComponentPropsWithoutRef, type PropsWithChildren } from 'react'
|
||||
import { DocsTabs } from 'ui'
|
||||
import { withQueryParams, withSticky, type QueryParamsProps } from 'ui-patterns/ComplexTabs'
|
||||
|
||||
const TabsWithStickyAndQueryParams = withSticky<PropsWithChildren<TabsProps & QueryParamsProps>>(
|
||||
withQueryParams(TabsPrimitive)
|
||||
)
|
||||
const TabsWithStickyAndQueryParams = withSticky<
|
||||
PropsWithChildren<DocsTabs.TabsProps & QueryParamsProps>
|
||||
>(withQueryParams(DocsTabs.Tabs))
|
||||
|
||||
const TabPanel = TabsPrimitive.Panel
|
||||
const TabPanel = DocsTabs.Tabs.Panel
|
||||
const Tabs = ({
|
||||
onChange,
|
||||
stickyTabList,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { useSearchParamsShallow } from 'common'
|
||||
import { xor } from 'lodash'
|
||||
import { Children, isValidElement, useEffect, useRef, type FC, type PropsWithChildren } from 'react'
|
||||
import { type TabsProps } from 'ui'
|
||||
import { type DocsTabs } from 'ui'
|
||||
|
||||
const isString = (maybeStr: unknown): maybeStr is string => typeof maybeStr === 'string'
|
||||
|
||||
@@ -18,7 +18,7 @@ interface QueryParamsProps {
|
||||
* selection state in query params.
|
||||
*/
|
||||
const withQueryParams =
|
||||
<Props extends PropsWithChildren<TabsProps>>(
|
||||
<Props extends PropsWithChildren<DocsTabs.TabsProps>>(
|
||||
Component: FC<Omit<Props, 'children' | 'queryGroup' | 'onClick'>>
|
||||
) =>
|
||||
({
|
||||
|
||||
@@ -5,7 +5,7 @@ export * from './src/components/Icon/IconBackground'
|
||||
|
||||
// DISPLAYS
|
||||
|
||||
export * from './src/components/Tabs'
|
||||
export * as DocsTabs from './src/components/Tabs'
|
||||
|
||||
// NAV
|
||||
|
||||
|
||||
Reference in new issue
Block a user