Skip to content

Commit

Permalink
Make PointerButton use Button instead of ButtonBase
Browse files Browse the repository at this point in the history
Fixes #1071
  • Loading branch information
lyzadanger committed Jun 9, 2023
1 parent 19ddafc commit 55b0dea
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/components/navigation/PointerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import classnames from 'classnames';

import type { PresentationalProps } from '../../types';
import { downcastRef } from '../../util/typing';
import ButtonBase from '../input/ButtonBase';
import type {
ButtonCommonProps,
HTMLButtonAttributes,
} from '../input/ButtonBase';
import Button from '../input/Button';
import type { ButtonProps } from '../input/Button';

type ComponentProps = {
/**
Expand All @@ -17,9 +14,8 @@ type ComponentProps = {
};

export type PointerButtonProps = PresentationalProps &
ButtonCommonProps &
ComponentProps &
HTMLButtonAttributes;
Omit<ButtonProps, 'variant' | 'size' | 'unstyled'> &
ComponentProps;

/**
* A button for pointing toward a quantified set of items somewhere else in the
Expand All @@ -46,12 +42,12 @@ const PointerButton = function PointerButton({

direction,

...htmlAttributes
...htmlAndButtonProps
}: PointerButtonProps) {
return (
<ButtonBase
<Button
data-component="PointerButton"
{...htmlAttributes}
{...htmlAndButtonProps}
elementRef={downcastRef(elementRef)}
classes={classnames(
// Establish relative positioning to allow absolute positioning of
Expand Down Expand Up @@ -125,9 +121,11 @@ const PointerButton = function PointerButton({
expanded={expanded}
pressed={pressed}
title={title}
variant="custom"
size="custom"
>
{children}
</ButtonBase>
</Button>
);
};

Expand Down

0 comments on commit 55b0dea

Please sign in to comment.