+
+
+
{message => (
@@ -67,10 +71,14 @@ class Search extends React.Component {
/>
)}
- {value !== '' && }
+ {value !== '' && (
+
+
+
+ )}
-
+
{upperFirst(model)}
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js b/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js
index 3db7d48c60..e3edcb35b5 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/Wysiwyg/previewWysiwyg.js
@@ -18,7 +18,7 @@ import {
} from 'draft-js';
import { List, OrderedSet, Repeat, fromJS } from 'immutable';
import { isEmpty, toArray } from 'lodash';
-import { WysiwygContext } from '../../contexts/Wysiwyg';
+import WysiwygContext from '../../contexts/Wysiwyg';
import WysiwygEditor from '../WysiwygEditor';
import converter from './converter';
import {
diff --git a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js
index d0f3895887..aad2b640d2 100644
--- a/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js
+++ b/packages/strapi-plugin-content-manager/admin/src/components/WysiwygInlineControls/Button.js
@@ -1,98 +1,82 @@
-import styled, { css } from 'styled-components';
+import React from 'react';
+import PropTypes from 'prop-types';
+import Bold from '../../icons/Bold';
+import Code from '../../icons/Code';
+import Media from '../../icons/Media';
+import Italic from '../../icons/Italic';
+import Link from '../../icons/Link';
+import Ol from '../../icons/Ol';
+import Quote from '../../icons/Quote';
+import Striked from '../../icons/Striked';
+import Ul from '../../icons/Ul';
+import Underline from '../../icons/Underline';
+import StyledButton from './StyledButton';
-import Bold from '../../assets/icons/icon_bold.svg';
-import Italic from '../../assets/icons/icon_italic.svg';
-import Underline from '../../assets/icons/icon_underline.svg';
-import Ul from '../../assets/icons/icon_bullet-list.svg';
-import Ol from '../../assets/icons/icon_numbered-list.svg';
-import Quote from '../../assets/icons/icon_quote-block.svg';
-import Code from '../../assets/icons/icon_code-block.svg';
-import Link from '../../assets/icons/icon_link.svg';
-import Striked from '../../assets/icons/icon_barred.svg';
-import Img from '../../assets/icons/icon_media.svg';
+const icons = {
+ bold: Bold,
+ italic: Italic,
+ underline: Underline,
+ ul: Ul,
+ ol: Ol,
+ link: Link,
+ quote: Quote,
+ code: Code,
+ striked: Striked,
+ img: Media,
+};
-const Button = styled.div`
- height: 32px;
- min-width: 32px;
- background-color: #ffffff;
- border: 1px solid rgba(16, 22, 34, 0.1);
- font-size: 13px;
- font-weight: 500;
- line-height: 32px;
- text-align: center;
- cursor: pointer;
+const Button = ({
+ active,
+ disabled,
+ className: type,
+ handler,
+ handlers,
+ hideLabel,
+ label,
+ style,
+ text,
+}) => {
+ const handleClick = e => {
+ e.preventDefault();
- &:hover {
- background-color: #f3f4f4;
- }
+ handlers[handler](text, style);
+ };
- ${({ active, disabled }) => {
- if (active) {
- return css`
- border: 0;
- background: rgba(16, 22, 34, 0);
- box-shadow: inset 0 -1px 0 0 rgba(16, 22, 34, 0.04),
- inset 0 1px 0 0 rgba(16, 22, 34, 0.04);
- `;
- }
+ const Icon = icons[type];
- if (disabled) {
- return css`
- opacity: 0.7;
- cursor: not-allowed;
- `;
- }
- }}
+ return (
+