diff --git a/.changeset/orange-drinks-add.md b/.changeset/orange-drinks-add.md
new file mode 100644
index 00000000..f8f6b3cc
--- /dev/null
+++ b/.changeset/orange-drinks-add.md
@@ -0,0 +1,5 @@
+---
+'@cube-dev/ui-kit': patch
+---
+
+Fixed alignment between label and suffix in Field component
diff --git a/src/components/forms/FieldWrapper.tsx b/src/components/forms/FieldWrapper.tsx
index a4f419b7..b89ac327 100644
--- a/src/components/forms/FieldWrapper.tsx
+++ b/src/components/forms/FieldWrapper.tsx
@@ -133,29 +133,21 @@ function FieldWrapper(props: CubeFieldWrapperProps, ref) {
{...labelProps}
>
- {tooltip || labelSuffix || extra ? (
-
- {label ? (
- tooltip || labelSuffix || extra ? (
- {label}
- ) : (
- label
- )
- ) : null}
- {tooltip ? (
-
-
-
- ) : null}
- {labelSuffix && {labelSuffix}
}
-
- ) : (
+
{label}
- )}
+
+ {tooltip ? (
+
+
+
+ ) : null}
+
+ {labelSuffix}
+
{extra && {extra}}
diff --git a/src/components/forms/Form/Field.stories.tsx b/src/components/forms/Form/Field.stories.tsx
index 834f01a1..08f96522 100644
--- a/src/components/forms/Form/Field.stories.tsx
+++ b/src/components/forms/Form/Field.stories.tsx
@@ -2,6 +2,8 @@ import { Meta, Story } from '@storybook/react';
import { baseProps } from '../../../stories/lists/baseProps';
import { CubeFieldProps, Field } from './Field';
import { TextInput } from '../TextInput/TextInput';
+import { Button } from '../../actions';
+import { DollarCircleFilled } from '@ant-design/icons';
export default {
title: 'Forms/Field',
@@ -77,3 +79,25 @@ WithSuffixExtraAndTooltip.args = {
extra: 'Extra info',
tooltip: 'Long description',
};
+
+export const WithButtonSuffix = Template.bind({});
+WithButtonSuffix.args = {
+ labelSuffix: (
+ } placeSelf="center" />
+ ),
+};
+
+export const WithButtonSuffixAndTooltip = Template.bind({});
+WithButtonSuffixAndTooltip.args = {
+ labelSuffix: (
+ }
+ placeSelf="center"
+ />
+ ),
+ tooltip: 'Long description',
+};
diff --git a/src/components/forms/Label.tsx b/src/components/forms/Label.tsx
index 2a923edf..de807212 100644
--- a/src/components/forms/Label.tsx
+++ b/src/components/forms/Label.tsx
@@ -54,7 +54,6 @@ export const INLINE_LABEL_STYLES: Styles = {
color: {
'': '#dark.85',
invalid: '#danger-text',
- disabled: '#dark.30',
},
whiteSpace: 'nowrap',
} as const;
@@ -66,7 +65,6 @@ export const LABEL_STYLES: Styles = {
color: {
'': '#dark',
invalid: '#danger-text',
- disabled: '#dark.30',
},
whiteSpace: 'nowrap',
width: {
diff --git a/src/components/pickers/Select/Select.stories.tsx b/src/components/pickers/Select/Select.stories.tsx
index bcf0c43a..ec73a414 100644
--- a/src/components/pickers/Select/Select.stories.tsx
+++ b/src/components/pickers/Select/Select.stories.tsx
@@ -69,5 +69,7 @@ WithIcon.args = { icon: true };
export const OverTheCustomBG = Template.bind({});
OverTheCustomBG.parameters = { backgrounds: { default: 'gray' } };
+export const Disabled = Template.bind({});
+Disabled.args = { isDisabled: true, label: 'Disabled' };
// export const Multiple = Template.bind({});
// Multiple.args = { icon: true, defaultSelectedKeys: ['red', 'violet'] };