File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/components/common/dropdown Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ interface DropdownContextType {
1515
1616const DropdownContext = createContext < DropdownContextType | null > ( null )
1717
18- const useDropdownContext = ( ) => {
18+ export const useDropdownContext = ( ) : DropdownContextType => {
1919 const context = useContext ( DropdownContext )
20+
2021 if ( ! context ) {
2122 throw new Error ( 'useDropdownContext must be used within a DropdownProvider' )
2223 }
@@ -112,7 +113,7 @@ interface ItemProps extends BaseProps {
112113
113114const getItemStyle = ( className : string ) =>
114115 clsx (
115- 'flex h-40 w-full items-center rounded-8 px-12 text-body2 text-gray-800 hover:bg-gray-100' ,
116+ 'flex h-40 w-full items-center rounded-8 px-12 text-body2 font-medium text-gray-800 hover:bg-gray-100' ,
116117 className
117118 )
118119
Original file line number Diff line number Diff line change 1- import { Dropdown } from './Dropdown'
1+ import { Dropdown , useDropdownContext } from './Dropdown'
22
3- export { Dropdown }
3+ export { Dropdown , useDropdownContext }
You can’t perform that action at this time.
0 commit comments