Skip to content

Commit

Permalink
fix: fix onclick func and button focus in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nesrinesghaier committed Mar 13, 2022
1 parent 762d453 commit a8b6c92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const ListGroup: FC<ListGroupProps> = ({ items }) => {
className={classNames(
'block w-full cursor-pointer py-2 px-4 first:rounded-t-lg last:rounded-b-lg focus:outline-none dark:bg-gray-800',
{
'bg-blue-700 text-white': item.active,
'!bg-blue-700 text-white': item.active,
'hover:bg-gray-100 hover:text-blue-700 dark:hover:bg-gray-600 dark:hover:text-white': !item.active,
},
)}
Expand Down
4 changes: 4 additions & 0 deletions src/pages/ListGroupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const ListGroupPage: FC = () => {
{
title: 'Profile',
icon: HiUserCircle,
onClick: () => alert('profile'),
},
{
title: 'Settings',
Expand Down Expand Up @@ -74,6 +75,9 @@ const ListGroupPage: FC = () => {
{
title: 'List group with icons',
code: <ListGroup items={itemsWithIcons} />,
codeStringifierOptions: {
functionValue: (fn) => (fn.name === 'onClick' ? fn : fn.name),
},
},
];

Expand Down

0 comments on commit a8b6c92

Please sign in to comment.