Skip to content

Commit

Permalink
Editable renamed to AsEditable
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry committed Jan 17, 2020
1 parent 5f55803 commit a7892a4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import {
import asEditableMenu from '../MainMenu/asEditableMenu';
import withEditableTitle from '../MainMenu/withEditableTitle';
import asBurgerSubMenu from './asBurgerSubMenu';
import Editable from '../MainMenu/types/Editable';
import AsEditable from '../MainMenu/types/AsEditable';

const asEditableBurgerSubMenu = (HeaderContent: string, editable: Editable) => flow(
const asEditableBurgerSubMenu = (HeaderContent: string, editable: AsEditable) => flow(
asBurgerSubMenu(HeaderContent),
withDesign({
Title: flow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import { flow } from 'lodash';
import { asEditableList } from '@bodiless/components';
import asMainMenu from './asMainMenu';
import withEditableTitle from './withEditableTitle';
import Editable from './types/Editable';
import AsEditable from './types/AsEditable';

/**
* HOC, produces *editable* main menu (based on rc-menu)
*/
const asEditableMainMenu = (editable: Editable) => flow(
const asEditableMainMenu = (editable: AsEditable) => flow(
asEditableList,
asMainMenu,
withEditableTitle(editable),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import { flow } from 'lodash';
import { asEditableList } from '@bodiless/components';
import asMainSubMenu from './asMainSubMenu';
import withEditableTitle from './withEditableTitle';
import Editable from './types/Editable';
import AsEditable from './types/AsEditable';

/**
* HOC, produces *editable* SubMenu
*/
const asEditableMainSubMenu = (editable: Editable) => flow(
const asEditableMainSubMenu = (editable: AsEditable) => flow(
asEditableList,
asMainSubMenu,
withEditableTitle(editable),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import { flow } from 'lodash';
import { asEditableList } from '@bodiless/components';
import asMenu from './asMenu';
import withEditableTitle from './withEditableTitle';
import Editable from './types/Editable';
import AsEditable from './types/AsEditable';

/**
* HOC, produces *editable* menu
*/
const asEditableMenu = (editable: Editable) => flow(
const asEditableMenu = (editable: AsEditable) => flow(
asEditableList,
asMenu,
withEditableTitle(editable),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
import { HOC } from '@bodiless/fclasses';

type Editable = (nodeKey?: string, placeholder?: string) => HOC;
type AsEditable = (nodeKey?: string, placeholder?: string) => HOC;

// eslint-disable-next-line no-undef
export default Editable;
export default AsEditable;
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import { flow } from 'lodash';
import { withDesign, HOC } from '@bodiless/fclasses';
import { asBodilessLink, withLinkToggle } from '@bodiless/components';
import { withNode, withNodeKey } from '@bodiless/core';
import Editable from './types/Editable';
import AsEditable from './types/AsEditable';
/**
* HOC, that injects editable link toggle component into component design (usually Menu or Submenu)
*/
const withEditableTitle = (editable: Editable) => withDesign({
const withEditableTitle = (editable: AsEditable) => withDesign({
Title: flow(
asBodilessLink('title-link'),
withLinkToggle,
Expand Down

0 comments on commit a7892a4

Please sign in to comment.