From f154d9d6e9ca461cf608674494cb23eee6db6534 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 9 Sep 2019 15:28:45 +0200 Subject: Use upstream's Icon component Rework the codebase to avoid unnecessary differences with upstream --- app/javascript/flavours/glitch/components/icon.js | 41 ++++++++++------------ .../flavours/glitch/components/icon_button.js | 5 +-- .../flavours/glitch/components/icon_with_badge.js | 2 +- .../features/account/components/action_bar.js | 2 +- .../glitch/features/account/components/header.js | 4 +-- .../flavours/glitch/features/audio/index.js | 4 +-- .../features/compose/components/dropdown_menu.js | 2 +- .../glitch/features/compose/components/header.js | 14 ++++---- .../features/compose/components/poll_form.js | 4 +-- .../features/compose/components/publisher.js | 4 +-- .../glitch/features/compose/components/search.js | 4 +-- .../features/compose/components/search_results.js | 8 ++--- .../features/compose/components/textarea_icons.js | 4 +-- .../glitch/features/compose/components/upload.js | 2 +- .../features/compose/components/upload_progress.js | 2 +- .../glitch/features/ui/components/actions_modal.js | 4 +-- .../glitch/features/ui/components/list_panel.js | 2 +- .../features/ui/components/navigation_panel.js | 20 +++++------ 18 files changed, 62 insertions(+), 66 deletions(-) (limited to 'app') diff --git a/app/javascript/flavours/glitch/components/icon.js b/app/javascript/flavours/glitch/components/icon.js index 8f55a0115..d8a17722f 100644 --- a/app/javascript/flavours/glitch/components/icon.js +++ b/app/javascript/flavours/glitch/components/icon.js @@ -1,26 +1,21 @@ -// Package imports. -import classNames from 'classnames'; -import PropTypes from 'prop-types'; import React from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; -// This just renders a FontAwesome icon. -export default function Icon ({ - className, - fullwidth, - icon, -}) { - const computedClass = classNames('icon', 'fa', { 'fa-fw': fullwidth }, `fa-${icon}`, className); - return icon ? ( -