Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Commit

Permalink
fix: tab mobile view issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rickk137 committed Jun 30, 2022
1 parent e770dbe commit d2b2aa2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/Tab/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type TabProps = {
export const Tab: React.FC<TabProps> = ({ text, active, onClick, disabled, className }) => (
<button
className={clsx(
'ui-transition ui-border ui-border-transparent ui-ease-out ui-min-w-button-md ui-rounded-[100px] ui-px-2 ui-py-1.5 ui-whitespace-nowrap',
'ui-transition ui-border ui-border-transparent ui-ease-out ui-rounded-[100px] ui-px-2 ui-py-1.5 ui-whitespace-nowrap',
{
'ui-text-primary': !active,
'ui-bg-primary ui-text-white': active,
Expand Down
4 changes: 2 additions & 2 deletions src/components/Tabs/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Basic.args = {
items: [
{
id: 1,
label: 'tab 1',
label: 'tab 1 tab 1 tab 1',
content: <div style={{ display: 'flex' }}>Tab 1</div>
},
{
id: 2,
label: 'tab 2',
label: 'tab 2 tab 1 tab 2',
content: null
},
{
Expand Down
7 changes: 1 addition & 6 deletions src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ export const Tabs: React.FC<TabsProps> = ({

return (
<>
<div
className={clsx(
'ui-flex ui-items-center ui-justify-center ui-flex-nowrap ui-overflow-auto',
className
)}
>
<div className={clsx('ui-flex ui-items-center ui-flex-nowrap ui-overflow-auto', className)}>
{items.map((item) => (
<Tab
key={item.id}
Expand Down

0 comments on commit d2b2aa2

Please sign in to comment.