From 21f7ca21e055bab52de42f0b20738f7b6235d513 Mon Sep 17 00:00:00 2001 From: Keith Grant Date: Thu, 31 Oct 2019 11:34:37 -0700 Subject: [PATCH] refactor dupe code to new TemplateAddButton component --- .../NotificationListItem.test.jsx.snap | 36 ++++---- .../TemplateList/TemplateAddButton.jsx | 54 +++++++++++ .../TemplateList/TemplateAddButton.test.jsx | 25 +++++ .../Template/TemplateList/TemplateList.jsx | 91 +------------------ 4 files changed, 102 insertions(+), 104 deletions(-) create mode 100644 awx/ui_next/src/screens/Template/TemplateList/TemplateAddButton.jsx create mode 100644 awx/ui_next/src/screens/Template/TemplateList/TemplateAddButton.test.jsx diff --git a/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap b/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap index ee9f735fec..6b8d98afcc 100644 --- a/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap +++ b/awx/ui_next/src/components/NotificationList/__snapshots__/NotificationListItem.test.jsx.snap @@ -331,9 +331,9 @@ exports[` initially renders succe "componentStyle": ComponentStyle { "componentId": "NotificationListItem__Switch-w674ng-1", "isStatic": true, - "lastClassName": "hbNxaH", + "lastClassName": "hfzRow", "rules": Array [ - "display:flex;flex-wrap:no-wrap;", + "display:flex;flex-wrap:no-wrap;--pf-c-switch__toggle-icon--Offset:0.125rem;", ], }, "displayName": "NotificationListItem__Switch", @@ -356,7 +356,7 @@ exports[` initially renders succe > initially renders succe componentProps={ Object { "aria-label": "Toggle notification start", - "className": "NotificationListItem__Switch-w674ng-1 hbNxaH", + "className": "NotificationListItem__Switch-w674ng-1 hfzRow", "id": "notification-9000-started-toggle", "isChecked": false, "isDisabled": false, @@ -382,7 +382,7 @@ exports[` initially renders succe > initially renders succe } >