Skip to content

Commit

Permalink
WIP - enabling more shared components by giving mobile empty components
Browse files Browse the repository at this point in the history
  • Loading branch information
mchowning committed Aug 18, 2019
1 parent 15f5ff4 commit fedbdc8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/block-editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ import Autocomplete from '../autocomplete';
import BlockFormatControls from '../block-format-controls';
import FormatToolbar from './format-toolbar';
import { withBlockEditContext } from '../block-edit/context';
import { ListEdit } from './list-edit';

const wrapperClasses = 'editor-rich-text block-editor-rich-text';
const classes = 'editor-rich-text__editable block-editor-rich-text__editable';

function RichTextWraper( {
children,
tagName,
value: originalValue,
onChange: originalOnChange,
selectionStart,
selectionEnd,
onSelectionChange,
multiline,
onTagNameChange,
inlineToolbar,
wrapperClassName,
className,
Expand Down Expand Up @@ -86,14 +85,7 @@ function RichTextWraper( {
>
{ ( { isSelected, value, onChange } ) =>
<View>
{ isSelected && multiline === 'li' && (
<ListEdit
onTagNameChange={ onTagNameChange }
tagName={ tagName }
value={ value }
onChange={ onChange }
/>
) }
{ children && children( { value, onChange } ) }
{ isSelected && ! inlineToolbar && (
<BlockFormatControls>
<FormatToolbar />
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export { default as Spinner } from './spinner';
export { createSlotFill, Slot, Fill, Provider as SlotFillProvider } from './slot-fill';
export { default as BaseControl } from './base-control';
export { default as TextareaControl } from './textarea-control';
export { default as PanelBody } from './panel/body';
export { default as TextControl } from './text-control';
export { default as ToggleControl } from './toggle-control';

// Higher-Order Components
export { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';
Expand Down
3 changes: 3 additions & 0 deletions packages/components/src/panel/body.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Not used by mobile at this time
const PanelBody = () => null;
export default PanelBody;
3 changes: 3 additions & 0 deletions packages/components/src/text-control/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Not used by mobile at this time
const TextControl = () => null;
export default TextControl;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Not used by mobile at this time
const ToggleControl = () => null;
export default ToggleControl;

0 comments on commit fedbdc8

Please sign in to comment.