From fbd37b6861a137f4a90576adeff9a95946b1efe6 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 21 Aug 2024 15:21:21 -0700 Subject: [PATCH] Allow controlling the gap between the icon and the content of OuiButton and OuiButtonEmpty (#1367) Signed-off-by: Miki (cherry picked from commit 7bdea7afd9874e3c1b5ad75e5beb62763dcc7fe7) Signed-off-by: Miki --- CHANGELOG.md | 3 + .../in_memory_table.test.tsx.snap | 3 + .../button/__snapshots__/button.test.tsx.snap | 66 +++++++++++++++++++ src/components/button/button.test.tsx | 16 ++++- src/components/button/button.tsx | 4 +- src/components/button/button_content.tsx | 17 +++++ .../__snapshots__/button_empty.test.tsx.snap | 66 +++++++++++++++++++ .../button/button_empty/button_empty.test.tsx | 16 ++++- .../button/button_empty/button_empty.tsx | 4 +- .../__snapshots__/control_bar.test.tsx.snap | 7 ++ .../__snapshots__/split_button.test.tsx.snap | 5 ++ src/global_styling/mixins/_button.scss | 18 +++++ src/global_styling/variables/_size.scss | 1 + .../global_styling/mixins/_button.scss | 18 +++++ .../global_styling/variables/_size.scss | 1 + .../v9/global_styling/mixins/_button.scss | 18 +++++ .../v9/global_styling/variables/_size.scss | 1 + 17 files changed, 260 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5fcef7f88..9e186b0acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ ### 📈 Features/Enhancements +- Add new icons for workspaces ([#1365](https://github.com/opensearch-project/oui/pull/1365)) +- Add a property to control the gap between an icon and the content of OuiButton and OuiButtonEmpty ([#1367](https://github.com/opensearch-project/oui/pull/1367)) + ### 🐛 Bug Fixes ### 🚞 Infrastructure diff --git a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap index ac72079baf..a65fa1469f 100644 --- a/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap +++ b/src/components/basic_table/__snapshots__/in_memory_table.test.tsx.snap @@ -406,6 +406,7 @@ exports[`OuiInMemoryTable behavior pagination 1`] = ` > `; +exports[`OuiButton props iconGap m is rendered 1`] = ` + +`; + +exports[`OuiButton props iconGap none is rendered 1`] = ` + +`; + +exports[`OuiButton props iconGap s is rendered 1`] = ` + +`; + exports[`OuiButton props iconSide left is rendered 1`] = ` +`; + +exports[`OuiButtonEmpty props iconGap none is rendered 1`] = ` + +`; + +exports[`OuiButtonEmpty props iconGap s is rendered 1`] = ` + +`; + exports[`OuiButtonEmpty props iconSide left is rendered 1`] = `