File tree Expand file tree Collapse file tree 7 files changed +12
-33
lines changed
apps/site/components/Common
packages/ui-components/src Expand file tree Collapse file tree 7 files changed +12
-33
lines changed Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import BaseLinkTabs from '@node-core/ui-components/Common/BaseLinkTabs' ;
42import type { LinkTabsProps } from '@node-core/ui-components/Common/BaseLinkTabs' ;
53import type { FC } from 'react' ;
64
75import Link from '#site/components/Link' ;
8- import { useRouter } from '#site/navigation.mjs' ;
96
10- const LinkTabs : FC < Omit < LinkTabsProps , 'as' | 'onSelect' > > = props => {
11- const { push } = useRouter ( ) ;
12- return < BaseLinkTabs onSelect = { value => push ( value ) } as = { Link } { ...props } /> ;
7+ const LinkTabs : FC < Omit < LinkTabsProps , 'as' > > = props => {
8+ return < BaseLinkTabs as = { Link } { ...props } /> ;
139} ;
1410
1511export default LinkTabs ;
Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import Avatar from '@node-core/ui-components/Common/AvatarGroup/Avatar' ;
42import type { FC } from 'react' ;
53
Original file line number Diff line number Diff line change 3838}
3939
4040.tabsSelect {
41- @apply sm:visible
42- md:hidden;
43-
44- > span {
45- @apply max-xs:flex
46- my-6
47- hidden
48- w-full;
49- }
41+ @apply md:hidden;
5042}
Original file line number Diff line number Diff line change 11import type { FC , PropsWithChildren } from 'react' ;
22
3- import Select from '#ui/Common/Select' ;
43import type { LinkLike } from '#ui/types' ;
54
65import styles from './index.module.css' ;
6+ import StatelessSelect from '../Select/StatelessSelect' ;
77
88type LinkTab = { key : string ; label : string ; link : string } ;
99
@@ -12,7 +12,6 @@ export type LinkTabsProps = PropsWithChildren<{
1212 tabs : Array < LinkTab > ;
1313 activeTab : string ;
1414 as ?: LinkLike ;
15- onSelect : ( value : string ) => void ;
1615} > ;
1716
1817const BaseLinkTabs : FC < LinkTabsProps > = ( {
@@ -21,7 +20,6 @@ const BaseLinkTabs: FC<LinkTabsProps> = ({
2120 activeTab,
2221 children,
2322 as : Component = 'a' ,
24- onSelect,
2523} ) => (
2624 < >
2725 < div className = { styles . tabsList } >
@@ -37,14 +35,12 @@ const BaseLinkTabs: FC<LinkTabsProps> = ({
3735 ) ) }
3836 </ div >
3937
40- < div className = { styles . tabsSelect } >
41- < Select
42- label = { label }
43- defaultValue = { tabs . find ( tab => tab . key === activeTab ) ?. link }
44- values = { tabs . map ( tab => ( { label : tab . label , value : tab . link } ) ) }
45- onChange = { onSelect }
46- />
47- </ div >
38+ < StatelessSelect
39+ label = { label }
40+ className = { styles . tabsSelect }
41+ defaultValue = { tabs . find ( tab => tab . key === activeTab ) ?. link }
42+ values = { tabs . map ( tab => ( { label : tab . label , value : tab . link } ) ) }
43+ />
4844
4945 { children }
5046 </ >
Original file line number Diff line number Diff line change 180180 }
181181
182182 .dropdown {
183- @apply absolute
183+ @apply z-99
184+ absolute
184185 left-0
185186 mt-4;
186187 }
Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import * as SeparatorPrimitive from '@radix-ui/react-separator' ;
42import classNames from 'classnames' ;
53import type { FC , ComponentProps } from 'react' ;
Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import Hamburger from '@heroicons/react/24/solid/Bars3Icon' ;
42import XMark from '@heroicons/react/24/solid/XMarkIcon' ;
53import * as Label from '@radix-ui/react-label' ;
You can’t perform that action at this time.
0 commit comments