From 32e932a5026524ff3ba427369b994b49fe90279a Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Mon, 30 Nov 2020 19:14:44 -0500 Subject: [PATCH 1/9] adjust EuiButtonEmpty styles --- src-docs/src/views/button/button_empty.js | 267 ++++-------------- src-docs/src/views/button/button_icon.js | 1 + .../__snapshots__/button_empty.test.tsx.snap | 30 ++ .../button/button_empty/_button_empty.scss | 2 + .../button/button_empty/button_empty.tsx | 10 +- .../__snapshots__/button_icon.test.tsx.snap | 14 + .../button/button_icon/_variables.scss | 1 + .../button/button_icon/button_icon.tsx | 2 + .../overrides/_button_empty.scss | 4 + 9 files changed, 111 insertions(+), 220 deletions(-) diff --git a/src-docs/src/views/button/button_empty.js b/src-docs/src/views/button/button_empty.js index f340a0c8822..7443e0e08b3 100644 --- a/src-docs/src/views/button/button_empty.js +++ b/src-docs/src/views/button/button_empty.js @@ -6,36 +6,59 @@ import { EuiFlexItem, } from '../../../../src/components/'; +const buttons = [ + 'primary', + 'secondary', + 'warning', + 'danger', + 'text', + 'disabled', +]; + export default () => (
- - - {}}>Primary - - - - {}}> - small - - - - - {}}> - extra small - - - + {buttons.map((value) => ( + <> + + + {}}> + {value} + + + + + {}}> + small + + + + + {}}> + extra small + + + + + ))} {}} iconType="arrowDown"> - Primary - - - - - {}} iconType="arrowDown"> - small + arrowDown @@ -44,155 +67,7 @@ export default () => ( onClick={() => {}} iconType="arrowDown" iconSide="right"> - Primary - - - - - {}} - iconType="arrowDown" - iconSide="right"> - small - - - - - - - {}}> - Danger - - - - - {}}> - small - - - - - {}}> - extra small - - - - - - - {}} iconType="arrowDown"> - Danger - - - - - {}} - iconType="arrowDown"> - small - - - - - {}} - iconType="arrowDown" - iconSide="right"> - Danger - - - - - {}} - iconType="arrowDown" - iconSide="right"> - small - - - - - - - {}}> - Text - - - - - {}}> - small - - - - - {}}> - extra small - - - - - - - {}} iconType="arrowDown"> - Text - - - - - {}} - iconType="arrowDown"> - small - - - - - {}} - iconType="arrowDown" - iconSide="right"> - Text - - - - - {}} - iconType="arrowDown" - iconSide="right"> - small - - - - - - - {}} isDisabled> - Disabled - - - - - {}} isDisabled> - small - - - - - {}} isDisabled> - extra small + arrowDown right @@ -210,51 +85,5 @@ export default () => ( - - - - {}} - iconType="arrowDown" - isDisabled> - Disabled - - - - - {}} - iconType="arrowDown" - isDisabled> - small - - - - - {}} - iconType="arrowDown" - iconSide="right" - isDisabled> - Disabled - - - - - {}} - iconType="arrowDown" - iconSide="right" - isDisabled> - small - - -
); diff --git a/src-docs/src/views/button/button_icon.js b/src-docs/src/views/button/button_icon.js index 827e6842446..c584efa0f44 100644 --- a/src-docs/src/views/button/button_icon.js +++ b/src-docs/src/views/button/button_icon.js @@ -14,6 +14,7 @@ const colors = [ 'success', 'warning', 'danger', + 'secondary', ]; export default () => ( diff --git a/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap b/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap index 6331e4f1a20..3b087259f31 100644 --- a/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap +++ b/src/components/button/button_empty/__snapshots__/button_empty.test.tsx.snap @@ -64,6 +64,21 @@ exports[`EuiButtonEmpty props color primary is rendered 1`] = ` `; +exports[`EuiButtonEmpty props color secondary is rendered 1`] = ` + +`; + exports[`EuiButtonEmpty props color text is rendered 1`] = ` +`; + exports[`EuiButtonEmpty props contentProps is rendered 1`] = ` +`; + exports[`EuiButtonIcon props color subdued is rendered 1`] = ` `; -exports[`EuiButtonEmpty props color secondary is rendered 1`] = ` +exports[`EuiButtonEmpty props color success is rendered 1`] = ` -`; - exports[`EuiButtonIcon props color subdued is rendered 1`] = `