From 3ab3eb43bdf37311f586b607812f1830daa63c05 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Mon, 20 Apr 2020 00:44:52 +0200 Subject: [PATCH] Remove onClick option from Icon.tsx --- scm-ui/ui-components/src/Icon.stories.tsx | 11 +---------- scm-ui/ui-components/src/Icon.tsx | 11 +++-------- .../src/__snapshots__/storyshots.test.ts.snap | 3 +-- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/scm-ui/ui-components/src/Icon.stories.tsx b/scm-ui/ui-components/src/Icon.stories.tsx index f51b615120..88fdff7731 100644 --- a/scm-ui/ui-components/src/Icon.stories.tsx +++ b/scm-ui/ui-components/src/Icon.stories.tsx @@ -32,10 +32,6 @@ const Wrapper = styled.div` } `; -const helloWorld = () => { - alert("Hello world!"); -}; - const colors = ["primary", "link", "info", "success", "warning", "danger", "white", "light", "dark", "black", "text"]; const sizing = ["xs", "sm", "lg", "2x", "3x", "5x", "7x", "10x"]; @@ -77,11 +73,6 @@ storiesOf("Icon", module) - helloWorld()} - /> + )); diff --git a/scm-ui/ui-components/src/Icon.tsx b/scm-ui/ui-components/src/Icon.tsx index 4f44c661fe..77b6591529 100644 --- a/scm-ui/ui-components/src/Icon.tsx +++ b/scm-ui/ui-components/src/Icon.tsx @@ -30,7 +30,6 @@ type Props = { name: string; color: string; className?: string; - onClick?: () => void; }; export default class Icon extends React.Component { @@ -40,16 +39,12 @@ export default class Icon extends React.Component { }; render() { - const { title, iconStyle, name, color, className, onClick } = this.props; + const { title, iconStyle, name, color, className } = this.props; if (title) { return ( - + ); } - return ; + return ; } } diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 47cf3c699b..9e6a8a7200 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -32820,8 +32820,7 @@ exports[`Storyshots Icon More options 1`] = ` /> `;