@contentful/field-editor-markdown 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-markdown@1.0.4...@contentful/field-editor-markdown@1.0.5) (2021-12-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - markdown buttons ([#968](https://github.com/contentful/field-editors/issues/968)) ([9803b98](https://github.com/contentful/field-editors/commit/9803b98c25d92df6148686ffe2749a77f7efdbb9))
11
+
6
12
  ## [1.0.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-markdown@1.0.3...@contentful/field-editor-markdown@1.0.4) (2021-12-20)
7
13
 
8
14
  **Note:** Version bump only for package @contentful/field-editor-markdown
@@ -453,24 +453,20 @@ var ToolbarButton = /*#__PURE__*/React__default.forwardRef(function (props, ref)
453
453
  isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
454
454
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
455
455
 
456
- var button = React__default.createElement(f36Components.Button, Object.assign({}, otherProps, {
456
+ return React__default.createElement(f36Components.Tooltip, {
457
+ className: styles$1.tooltip,
458
+ placement: tooltipPlace,
459
+ content: tooltip
460
+ }, React__default.createElement(f36Components.IconButton, Object.assign({}, otherProps, {
457
461
  ref: ref,
458
462
  className: emotion.cx(styles$1.button, className),
459
463
  isDisabled: isDisabled,
460
464
  onClick: onClick,
461
465
  variant: variant,
462
- size: "small"
463
- }), children);
464
-
465
- if (tooltip) {
466
- return React__default.createElement(f36Components.Tooltip, {
467
- className: styles$1.tooltip,
468
- placement: tooltipPlace,
469
- content: tooltip
470
- }, button);
471
- }
472
-
473
- return button;
466
+ size: "small",
467
+ icon: children,
468
+ "aria-label": tooltip
469
+ })));
474
470
  });
475
471
  ToolbarButton.displayName = 'ToolbarButton';
476
472
 
@@ -679,7 +675,8 @@ function DefaultMarkdownToolbar(props) {
679
675
  testId: "markdown-action-button-zen",
680
676
  variant: "secondary",
681
677
  onClick: props.actions.openZenMode,
682
- className: styles$1.zenButton
678
+ className: styles$1.zenButton,
679
+ tooltip: "Expand"
683
680
  }, React__default.createElement(Zen, {
684
681
  label: "Expand",
685
682
  className: styles$1.icon
@@ -698,18 +695,20 @@ function ZenMarkdownToolbar(props) {
698
695
  onSelectExisting: props.actions.linkExistingMedia,
699
696
  onAddNew: props.actions.addNewMedia,
700
697
  canAddNew: props.canUploadAssets
701
- }), React__default.createElement(f36Components.Button, {
698
+ }), React__default.createElement(f36Components.IconButton, {
702
699
  testId: "markdown-action-button-zen-close",
703
700
  variant: "secondary",
704
701
  size: "small",
705
702
  className: emotion.cx(styles$1.zenButton, styles$1.zenButtonPressed),
706
703
  onClick: function onClick() {
707
704
  props.actions.closeZenMode();
708
- }
709
- }, React__default.createElement(Zen, {
710
- label: "Collapse",
711
- className: styles$1.icon
712
- })))));
705
+ },
706
+ icon: React__default.createElement(Zen, {
707
+ label: "Collapse",
708
+ className: styles$1.icon
709
+ }),
710
+ "aria-label": "Collapse"
711
+ }))));
713
712
  }
714
713
  var MarkdownToolbar = /*#__PURE__*/React__default.memo(function (props) {
715
714
  if (props.mode === 'zen') {