@heliosgraphics/ui 2.0.0-alpha.67 → 2.0.0-alpha.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,10 @@ export const meta: HeliosAttributeMeta<ConfirmProps> = {
11
11
  ],
12
12
  _status: "experimental",
13
13
  _category: "pattern",
14
+ buttonGroupAlign: {
15
+ type: "'left' | 'center' | 'right'",
16
+ isOptional: true,
17
+ },
14
18
  cancelText: {
15
19
  type: "string",
16
20
  },
@@ -3,21 +3,22 @@ import type { ConfirmProps } from "./Confirm.types"
3
3
  import type { FC } from "react"
4
4
 
5
5
  export const Confirm: FC<ConfirmProps> = ({
6
+ buttonGroupAlign,
7
+ cancelText,
8
+ confirmText,
9
+ description,
10
+ icon,
11
+ intent,
12
+ isOpen,
6
13
  onCancel,
7
14
  onConfirm,
8
- isOpen,
9
15
  title,
10
- intent,
11
- description,
12
- icon,
13
- cancelText,
14
- confirmText,
15
16
  }) => {
16
17
  return (
17
18
  <Dialog title={title} onClose={onCancel} isOpen={isOpen} isCentered={true}>
18
19
  <Flex gap={12} isColumn={true}>
19
20
  {!!description && <Text type="paragraph">{description}</Text>}
20
- <ButtonGroup>
21
+ <ButtonGroup align={buttonGroupAlign}>
21
22
  <Button intent={intent} value={confirmText} onClick={onConfirm} {...(icon && { icon })} />
22
23
  <Button intent="neutral" value={cancelText} onClick={onCancel} />
23
24
  </ButtonGroup>
@@ -1,8 +1,9 @@
1
- import type { HeliosIconType, HeliosIntentionType } from "../.."
1
+ import type { ButtonGroupProps, HeliosIconType, HeliosIntentionType } from "../.."
2
2
 
3
3
  export interface ConfirmProps {
4
4
  cancelText: string
5
5
  confirmText: string
6
+ buttonGroupAlign?: ButtonGroupProps["align"]
6
7
  description?: string
7
8
  icon?: HeliosIconType
8
9
  intent: HeliosIntentionType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heliosgraphics/ui",
3
- "version": "2.0.0-alpha.67",
3
+ "version": "2.0.0-alpha.68",
4
4
  "type": "module",
5
5
  "author": "Chris Puska <chris@puska.org>",
6
6
  "private": false,