diff --git a/packages/eui/changelogs/upcoming/7818.md b/packages/eui/changelogs/upcoming/7818.md new file mode 100644 index 00000000000..f2cd10fbb94 --- /dev/null +++ b/packages/eui/changelogs/upcoming/7818.md @@ -0,0 +1,8 @@ +**Breaking changes** + +- Removed the unused `compressed` prop from `EuiCheckbox` and `EuiRadio`. This prop was not doing anything on individual components. + +**CSS-in-JS conversions** + +- Converted `EuiCheckboxGroup` to Emotion +- Converted `EuiRadioGroup` to Emotion diff --git a/packages/eui/src-docs/src/views/selection_controls/checkbox.js b/packages/eui/src-docs/src/views/selection_controls/checkbox.js index 8b051426d33..715cfe54c0e 100644 --- a/packages/eui/src-docs/src/views/selection_controls/checkbox.js +++ b/packages/eui/src-docs/src/views/selection_controls/checkbox.js @@ -57,10 +57,10 @@ export default () => { onChange(e)} - compressed + readOnly /> ); diff --git a/packages/eui/src/components/form/checkbox/__snapshots__/checkbox_group.test.tsx.snap b/packages/eui/src/components/form/checkbox/__snapshots__/checkbox_group.test.tsx.snap index 7499992d87b..a2d9bbc2fbc 100644 --- a/packages/eui/src/components/form/checkbox/__snapshots__/checkbox_group.test.tsx.snap +++ b/packages/eui/src/components/form/checkbox/__snapshots__/checkbox_group.test.tsx.snap @@ -1,7 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`EuiCheckboxGroup (mocked checkbox) disabled is rendered 1`] = ` -
+
@@ -12,7 +14,9 @@ exports[`EuiCheckboxGroup (mocked checkbox) disabled is rendered 1`] = ` `; exports[`EuiCheckboxGroup (mocked checkbox) idToSelectedMap is rendered 1`] = ` -
+
@@ -23,7 +27,9 @@ exports[`EuiCheckboxGroup (mocked checkbox) idToSelectedMap is rendered 1`] = ` `; exports[`EuiCheckboxGroup (mocked checkbox) individual disabled is rendered 1`] = ` -
+
@@ -36,13 +42,15 @@ exports[`EuiCheckboxGroup (mocked checkbox) individual disabled is rendered 1`] exports[`EuiCheckboxGroup (mocked checkbox) is rendered 1`] = `
`; exports[`EuiCheckboxGroup (mocked checkbox) legend is rendered 1`] = ` -
+
@@ -52,7 +60,9 @@ exports[`EuiCheckboxGroup (mocked checkbox) legend is rendered 1`] = ` `; exports[`EuiCheckboxGroup (mocked checkbox) options are rendered 1`] = ` -
+
diff --git a/packages/eui/src/components/form/checkbox/_checkbox_group.scss b/packages/eui/src/components/form/checkbox/_checkbox_group.scss deleted file mode 100644 index 8554feff4d9..00000000000 --- a/packages/eui/src/components/form/checkbox/_checkbox_group.scss +++ /dev/null @@ -1,7 +0,0 @@ -.euiCheckboxGroup__item + .euiCheckboxGroup__item { - margin-top: $euiSizeXS; - - &.euiCheckbox--compressed { - margin-top: 0; - } -} diff --git a/packages/eui/src/components/form/checkbox/_index.scss b/packages/eui/src/components/form/checkbox/_index.scss index 295196b2459..e6e53eb7128 100644 --- a/packages/eui/src/components/form/checkbox/_index.scss +++ b/packages/eui/src/components/form/checkbox/_index.scss @@ -1,2 +1 @@ @import 'checkbox'; -@import 'checkbox_group'; diff --git a/packages/eui/src/components/form/checkbox/checkbox.stories.tsx b/packages/eui/src/components/form/checkbox/checkbox.stories.tsx index e58d11febb4..95c41abe58f 100644 --- a/packages/eui/src/components/form/checkbox/checkbox.stories.tsx +++ b/packages/eui/src/components/form/checkbox/checkbox.stories.tsx @@ -19,7 +19,6 @@ const meta: Meta = { component: EuiCheckbox, args: { checked: false, - compressed: false, disabled: false, indeterminate: false, // set up for easier testing/QA diff --git a/packages/eui/src/components/form/checkbox/checkbox.tsx b/packages/eui/src/components/form/checkbox/checkbox.tsx index 0501dc2cb38..496472a6020 100644 --- a/packages/eui/src/components/form/checkbox/checkbox.tsx +++ b/packages/eui/src/components/form/checkbox/checkbox.tsx @@ -30,10 +30,6 @@ export interface EuiCheckboxProps inputRef?: (element: HTMLInputElement) => void; label?: ReactNode; disabled?: boolean; - /** - * when `true` creates a shorter height checkbox row - */ - compressed?: boolean; indeterminate?: boolean; /** * Object of props passed to the