Skip to content

Commit

Permalink
💄 Add proper alignment in tab-menu stretch variant
Browse files Browse the repository at this point in the history
  • Loading branch information
yashsehgal committed Jan 20, 2024
1 parent 4af1cff commit 6b53ab0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "craftbook",
"private": false,
"version": "1.5.1",
"version": "1.5.2",
"author": "Yash Sehgal <[email protected]>",
"type": "module",
"files": [
Expand Down
8 changes: 4 additions & 4 deletions src/components/tab-menu/tab-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ const TabMenu = forwardRef<HTMLDivElement, TabMenuProps>(
)}>
<Grid
ref={ref}
className={cn('w-fit', className)}
className={cn('w-fit', stretch && "w-full", className)}
cols={options.length}
alignItems="center"
justifyContent="center"
justifyContent={"center"}
{...props}>
{options.map((option, index) => {
return (
Expand All @@ -62,10 +62,10 @@ const TabMenuOption = forwardRef<HTMLButtonElement, TabMenuOptionProps>(
<button
ref={ref}
className={cn(
'tab-menu-option px-3 py-1.5 transition-all w-fit',
'tab-menu-option px-3 py-1.5 transition-all',
!isSelected && 'hover:border-b-2 hover:border-black/10',
isSelected &&
'border-b-2 border-b-black drop-shadow-lg before:outline-none',
'border-b-2 border-b-black drop-shadow-lg before:outline-none',
className,
)}
aria-label={label}
Expand Down

0 comments on commit 6b53ab0

Please sign in to comment.