From 4b9f7e98241e19b55f7a0548400f08bcc9aef3a6 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 21 Aug 2024 16:27:54 -0700 Subject: [PATCH] Allow controlling the gap between the icon and the content of OuiButton and OuiButtonEmpty (#1367) (#1368) * 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 * Bump version for the next release Signed-off-by: Miki --------- Signed-off-by: Miki --- CHANGELOG.md | 3 + package.json | 2 +- .../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 + 18 files changed, 261 insertions(+), 5 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/package.json b/package.json index 3f89c1101f..75a9a0d565 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@opensearch-project/oui", "description": "OpenSearch UI Component Library", - "version": "1.10.0", + "version": "1.11.0", "license": "Apache-2.0", "main": "lib", "module": "es", 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`] = `