diff --git a/package.json b/package.json index 298d8a413..517b33013 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "normalize.cssinjs": "1.0.5", "polished": "2.3.1", "react-svg": "7.2.2", - "suomifi-icons": "0.0.5" + "suomifi-icons": "0.0.6" }, "peerDependencies": { "react": "16.6.3", diff --git a/src/core/Button/Button.tsx b/src/core/Button/Button.tsx index ee5a4cca1..ffbff4f9f 100644 --- a/src/core/Button/Button.tsx +++ b/src/core/Button/Button.tsx @@ -122,6 +122,7 @@ class ButtonWithIcon extends Component { {!!icon && ( { {passProps.children} {!!iconRight && ( diff --git a/src/core/Icon/Icon.baseStyles.tsx b/src/core/Icon/Icon.baseStyles.tsx index d3dac21a4..6b0c6999d 100644 --- a/src/core/Icon/Icon.baseStyles.tsx +++ b/src/core/Icon/Icon.baseStyles.tsx @@ -6,5 +6,10 @@ export const iconBaseStyles = ({ }: SuomifiIconProps) => css` display: inline-block; vertical-align: bottom; - ${!!mousePointer && 'cursor: pointer;'} + ${!!mousePointer && + `cursor: pointer; + & * { + cursor: inherit; + } + `} `; diff --git a/src/core/Icon/Icon.md b/src/core/Icon/Icon.md index 03312a71f..3efb4c2d1 100644 --- a/src/core/Icon/Icon.md +++ b/src/core/Icon/Icon.md @@ -2,8 +2,36 @@ ``` -```jsx - - - +```jsx noeditor +const styled = require('@emotion/styled').default; +const { allIcons, allStaticIcons } = require('suomifi-icons'); +const clipboardCopy = require('clipboard-copy'); +const StyledIcon = styled(props => )({ + height: '50px', + width: 'auto', + margin: '8px' +}); + +
+
+ {allIcons.map(icon => ( + clipboardCopy(icon)} + /> + ))} +
+
+ {allStaticIcons.map(icon => ( + clipboardCopy(icon)} + /> + ))} +
+
; ``` diff --git a/yarn.lock b/yarn.lock index eefb9e4d8..bfa7732a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9186,10 +9186,10 @@ sugarss@^2.0.0: dependencies: postcss "^7.0.2" -suomifi-icons@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/suomifi-icons/-/suomifi-icons-0.0.5.tgz#ca86d8a38c0f8c0264144022c6111ed97be09768" - integrity sha512-6eCOoKPLekuQlqSqn8Lp4+qpyvO5ifQPYdlW/CxK0V5zAbC8SKN8mDzwxNcbt3J1HzFRvXGfOYlS1lnAt0ylZQ== +suomifi-icons@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/suomifi-icons/-/suomifi-icons-0.0.6.tgz#7adb394c75922a1b9fe0e0c7f6f833848aa8b657" + integrity sha512-0KMl4guo1oMAnju4gOR+2fIGW3QTOGwof1/ZkAGtbASkUsOqkQr8nCP8mdOS9l1RM1jws4daHCAxWluTrtNkow== dependencies: "@types/react" "16.7.20" "@types/react-dom" "16.0.11"