From 47370b910d41f7535792bd6ac13f78a6d4be34d7 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Wed, 3 Feb 2021 08:19:20 +0100 Subject: [PATCH 1/8] feat: Use svgr icons --- react/ContactsListModal/AddContactButton.jsx | 4 +++- react/ContactsListModal/index.jsx | 3 ++- react/Modal/ModalBackButton.jsx | 4 +++- react/SelectBox/SelectBox.jsx | 5 +++-- react/Viewer/ShortcutViewer.jsx | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/react/ContactsListModal/AddContactButton.jsx b/react/ContactsListModal/AddContactButton.jsx index 57dbdce325..d7f8f43631 100644 --- a/react/ContactsListModal/AddContactButton.jsx +++ b/react/ContactsListModal/AddContactButton.jsx @@ -1,10 +1,12 @@ import React from 'react' import { withClient, models, queryConnect, Q } from 'cozy-client' + import AppLinker from '../AppLinker' import { ButtonLink } from '../Button' import compose from 'lodash/flowRight' import useRealtime from '../hooks/useRealtime' import useEventListener from '../hooks/useEventListener.js' +import PlusIcon from '../Icons/Plus' const DumbAddContactButton = props => { const { client, apps, ...rest } = props @@ -45,7 +47,7 @@ const DumbAddContactButton = props => { { onClick={rest.dismissAction} extension="narrow" iconOnly - icon="previous" + icon={PreviousIcon} theme="primary" /> )} diff --git a/react/Modal/ModalBackButton.jsx b/react/Modal/ModalBackButton.jsx index 6724e1b18e..0efce86a3f 100644 --- a/react/Modal/ModalBackButton.jsx +++ b/react/Modal/ModalBackButton.jsx @@ -4,6 +4,8 @@ import { Button } from '../Button' import withBreakpoints from '../helpers/withBreakpoints' import styles from './styles.styl' +import PreviousIcon from '../Icons/Previous' + const DumbModalBackButton = props => { const { breakpoints: { isMobile }, @@ -13,7 +15,7 @@ const DumbModalBackButton = props => { return ( +
" `; exports[`Button should render examples: Button 11`] = ` "
-
+
" `; exports[`Button should render examples: Button 12`] = ` "
-
+
" `; exports[`Button should render examples: Button 13`] = ` "
-

+

-

-

+

+

" `; @@ -455,7 +479,7 @@ exports[`Button should render examples: Button 14`] = `

Link to Cozy.io

Link to Cozy.io

Link to Cozy.io

-

Link to Cozy.io

+

Link to Cozy.io

" `; @@ -2149,8 +2173,8 @@ exports[`Dialog should render examples: Dialog 1`] = `"

-
+

Connect to your Cozy

@@ -7714,8 +7747,8 @@ exports[`Wizard should render examples: Wizard 1`] = `

There is an error

-
From b9da2829a23d1508ede05812098d052812bece46 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Wed, 3 Feb 2021 13:13:27 +0100 Subject: [PATCH 8/8] fix: Use svgr icons in examples --- react/SelectionBar/Readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/react/SelectionBar/Readme.md b/react/SelectionBar/Readme.md index fbad015631..d4392096e3 100644 --- a/react/SelectionBar/Readme.md +++ b/react/SelectionBar/Readme.md @@ -7,7 +7,7 @@ import SelectionBar from 'cozy-ui/transpiled/react/SelectionBar'; import I18n from 'cozy-ui/transpiled/react/I18n'; import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'; import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash' - +import RenameIcon from 'cozy-ui/transpiled/react/Icons/Rename' const selectedItem = { _id: 1, @@ -38,7 +38,8 @@ const actions = { }, rename: { action: selections => alert(JSON.stringify(selections)), - displayCondition: selections => selections.length > 1 + displayCondition: selections => selections.length > 1, + icon: RenameIcon } };