Skip to content

Commit

Permalink
update type description and how reversed variant is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mcwinter07 committed Nov 28, 2024
1 parent 4ae4a0f commit 1d5bb31
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/components/src/__actions__/Button/v3/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type ButtonBaseProps = Omit<RACButtonProps, "children"> & {
/** Controls if the button inherits width from its parent. @default "false" */
isFullWidth?: boolean
/**
* Controls the reversed style of Button @default false
* @deprecated Use the ReversedColors Provider instead. This is here to support gradual migration to the ReversedColors Provider. {@link https://cultureamp.design/?path=/docs/actions-button-button-v3-api-specification--docs#variants}
* Controls the reversed style of Button
* @deprecated Use the ReversedColors Provider instead. This is here to support gradual migration to the ReversedColors Provider and will take precedence if a value is provided. {@link https://cultureamp.design/?path=/docs/actions-button-button-v3-api-specification--docs#variants}
*/
isReversed?: boolean
}
Expand All @@ -50,12 +50,14 @@ export const Button = forwardRef(
isPending,
hasHiddenPendingLabel: propsHasHiddenPendingLabel = false,
pendingLabel,
isReversed = false,
isReversed,
...restProps
}: ButtonProps,
ref: React.ForwardedRef<HTMLButtonElement>
) => {
const isReversedVariant = useReversedColors() || isReversed
const shouldUseReverse = useReversedColors()
const isReversedVariant =
isReversed !== undefined ? isReversed : shouldUseReverse
const pendingProps: PendingButtonProps = isPending
? {
isPending,
Expand Down

0 comments on commit 1d5bb31

Please sign in to comment.