Skip to content

Commit

Permalink
- Apply new list attrs to the dropdown and tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
duduBTW committed Nov 20, 2024
1 parent 850faac commit c66174d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type Props = JSX.IntrinsicElements["button"];
const DropdownListItem: Component<Props> = (props) => {
const state = useDropdownList();
const value = state.namespace.create();
const { attrs, tabIndex, isSelected } = state.item(value, {
const { attrs, tabIndex } = state.item(value, {
onPointerMove: state.handleItemPointerMove,
});

Expand All @@ -19,10 +19,7 @@ const DropdownListItem: Component<Props> = (props) => {
<RawList.Item
onPointerLeave={state.handleItemPointerLeave}
tabIndex={tabIndex()}
classList={{
"bg-overlay/30": state.isHighlighted() && isSelected(),
}}
{...attrs}
{...attrs()}
{...props}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/components/tabs/TabsTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const TabsTrigger: Component<Props> = (_props) => {
<button
data-selected={isSelected()}
tabIndex={tabIndex()}
{...attrs}
{...attrs()}
{...rest}
class={cn(
"ring-offset-background z-10 flex h-[33px] items-center gap-2 rounded-lg px-3 text-subtext transition-colors",
Expand Down

0 comments on commit c66174d

Please sign in to comment.