From 6cabcbd100a91becf15c2cede187b332d5ddda65 Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 25 Jan 2019 11:33:57 +0100 Subject: [PATCH] fix: make sure #icon gets always a default size --- .../src/components/button/Button.js | 8 +-- .../__snapshots__/Button.test.js.snap | 26 ++++----- .../src/components/button/style/_button.scss | 2 +- .../__snapshots__/Dropdown.test.js.snap | 22 ++++---- .../__snapshots__/FormStatus.test.js.snap | 2 +- .../dnb-ui-lib/src/components/icon/Icon.js | 4 ++ .../__tests__/__snapshots__/Icon.test.js.snap | 22 ++++---- .../src/components/icon/description.md | 13 +++++ .../src/components/icon/style/_icon.scss | 19 ++++--- .../__snapshots__/InputMasked.test.js.snap | 22 ++++---- .../__snapshots__/Input.test.js.snap | 22 ++++---- .../__snapshots__/Modal.test.js.snap | 34 ++++++------ .../__tests__/__snapshots__/Tabs.test.js.snap | 10 ++-- .../tabs/style/themes/dnb-tabs-theme-ui.scss | 8 +-- .../dnb-ui-lib/src/style/themes/anchor.scss | 53 +++++++++++-------- 15 files changed, 152 insertions(+), 115 deletions(-) diff --git a/packages/dnb-ui-lib/src/components/button/Button.js b/packages/dnb-ui-lib/src/components/button/Button.js index f2c1403d008..a1b60222682 100644 --- a/packages/dnb-ui-lib/src/components/button/Button.js +++ b/packages/dnb-ui-lib/src/components/button/Button.js @@ -6,7 +6,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import Icon from '../icon-primary/IconPrimary' +import IconPrimary from '../icon-primary/IconPrimary' import { registerElement, validateDOMAttributes, @@ -63,7 +63,7 @@ export const defaultProps = { title: null, icon: null, icon_position: 'right', - icon_size: null, + icon_size: 'default', href: null, id: null, class: null, @@ -232,7 +232,7 @@ class Content extends PureComponent { title: null, content: null, icon: null, - icon_size: null, + icon_size: 'default', isIconOnly: null } render() { @@ -262,7 +262,7 @@ class Content extends PureComponent { if (icon) { const alt = title || text ret.push( -