Skip to content

Commit

Permalink
chore: button recipe notes
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-watters committed Feb 19, 2024
1 parent 2112716 commit 7729693
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/app/ui/components/button/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BtcIcon } from '@app/ui/components/avatar-icon/btc-icon';
import { ChevronDownIcon } from '@app/ui/icons/chevron-down-icon';
import { PlaceholderIcon } from '@app/ui/icons/placeholder-icon';

// TODO - fix this, my branch is missing a lot of variants and I thin kthats whays up with bottons
import { Button as Component } from './button';

const meta: Meta<typeof Component> = {
Expand Down
5 changes: 3 additions & 2 deletions src/app/ui/components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ type ButtonProps = Omit<React.ComponentProps<typeof StyledButton>, keyof ButtonV
ButtonVariantProps;

export function Button(props: ButtonProps) {
const { children, fullWidth, size, trigger, type = 'button', variant, ...rest } = props;
const { children, fullWidth, size, trigger, invert, type = 'button', variant, ...rest } = props;
// pete - not sure we need this invert but it could be thje key difference
return (
<StyledButton
className={buttonRecipe({ fullWidth, size, trigger, variant })}
className={buttonRecipe({ fullWidth, size, invert, trigger, variant })}
type={type}
{...rest}
>
Expand Down
4 changes: 2 additions & 2 deletions src/app/ui/components/link/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ type LinkProps = Omit<React.ComponentProps<typeof StyledLink>, keyof LinkVariant
LinkVariantProps;

export const Link = forwardRef((props: LinkProps, ref: ForwardedRef<HTMLAnchorElement>) => {
const { children, disabled, fullWidth, size, variant, ...rest } = props;
const { children, disabled, fullWidth, size, invert, variant, ...rest } = props;

return (
<StyledLink
ref={ref}
className={linkRecipe({ disabled, fullWidth, size, variant })}
className={linkRecipe({ disabled, fullWidth, invert, size, variant })}
cursor="pointer"
{...rest}
>
Expand Down

0 comments on commit 7729693

Please sign in to comment.