diff --git a/packages/orbit-components/src/ButtonLink/README.md b/packages/orbit-components/src/ButtonLink/README.md index 42ee6635f0..4ab29ffdf7 100644 --- a/packages/orbit-components/src/ButtonLink/README.md +++ b/packages/orbit-components/src/ButtonLink/README.md @@ -21,10 +21,12 @@ Table below contains all types of the props available in ButtonLink component. | ariaControls | `string` | | Id of the element the button controls. | | ariaExpanded | `boolean` | | Tells screen reader the controlled element from `ariaControls` is expanded | | asComponent | `string \| () => React.Element` | `"button"` | The component used for the root node. | +| centered | `boolean` | `false` | Can only be used when `fullWidth` is true and if `iconLeft` and/or `iconRight` are defined. If `centered` prop is `true`, the Button will center everything. | | circled | `boolean` | `false` | If `true`, the ButtonLink will have circular shape. | | children | `React.Node` | | The content of the ButtonLink. [See Functional specs](#functional-specs) | | compact | `boolean` | `false` | If `true`, the ButtonLink will not have horizontal paddings. | | disabled | `boolean` | `false` | If `true`, the ButtonLink will be disabled. | +| download | `boolean \| string` | | Can only be used when `href` is defined. Adds the `download` attribute to the anchor element. | | dataTest | `string` | | Optional prop for testing purposes. | | id | `string` | | Set `id` for `ButtonLink` | | external | `boolean` | `false` | If `true`, the ButtonLink opens link in a new tab. [See Functional specs](#functional-specs) | diff --git a/packages/orbit-components/src/ButtonLink/types.d.ts b/packages/orbit-components/src/ButtonLink/types.d.ts index 6885ce1bd0..9d44e2e771 100644 --- a/packages/orbit-components/src/ButtonLink/types.d.ts +++ b/packages/orbit-components/src/ButtonLink/types.d.ts @@ -1,12 +1,21 @@ // Type definitions for @kiwicom/orbit-components // Project: http://github.com/kiwicom/orbit import type * as Common from "../common/types"; -import type { ButtonCommonProps, Size } from "../primitives/ButtonPrimitive/types"; +import type { + ButtonCommonProps, + Size, + DownloadWithHrefConditionalProps, + FullWidthConditionalProps, +} from "../primitives/ButtonPrimitive/types"; export type Type = "primary" | "secondary" | "critical"; -export interface Props extends Common.Globals, Common.SpaceAfter, ButtonCommonProps { +export type Props = { readonly compact?: boolean; readonly type?: Type; readonly size?: Size; -} +} & Common.Globals & + Common.SpaceAfter & + ButtonCommonProps & + FullWidthConditionalProps & + DownloadWithHrefConditionalProps;