mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-21 06:45:31 -06:00
Remove JSX from src/
This commit is contained in:
parent
5b7912679c
commit
cf1c9c2d3c
7 changed files with 120 additions and 67 deletions
4
src/react-components/Box.js
vendored
4
src/react-components/Box.js
vendored
|
|
@ -7,10 +7,10 @@ class Box extends Component {
|
|||
const { vertical, children, ...otherProps } = this.props;
|
||||
|
||||
if (vertical) {
|
||||
return <VerticalBox {...otherProps}>{children}</VerticalBox>;
|
||||
return React.createElement(VerticalBox, otherProps, children);
|
||||
}
|
||||
|
||||
return <HorizontalBox {...otherProps}>{children}</HorizontalBox>;
|
||||
return React.createElement(HorizontalBox, otherProps, children);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
4
src/react-components/Menu.js
vendored
4
src/react-components/Menu.js
vendored
|
|
@ -5,14 +5,14 @@ import { MenuBar, MenuBarItem } from '../';
|
|||
class Menu extends Component {
|
||||
render() {
|
||||
const { children, ...otherProps } = this.props;
|
||||
return <MenuBar {...otherProps}>{children}</MenuBar>;
|
||||
return React.createElement(MenuBar, otherProps, children);
|
||||
}
|
||||
}
|
||||
|
||||
Menu.Item = class Item extends Component {
|
||||
render() {
|
||||
const { children, ...otherProps } = this.props;
|
||||
return <MenuBarItem {...otherProps}>{children}</MenuBarItem>;
|
||||
return React.createElement(MenuBarItem, otherProps, children);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
6
src/react-components/Picker.js
vendored
6
src/react-components/Picker.js
vendored
|
|
@ -6,17 +6,17 @@ class Picker extends Component {
|
|||
render() {
|
||||
const { editable, children, ...otherProps } = this.props;
|
||||
if (editable) {
|
||||
return <EditableCombobox {...otherProps}>{children}</EditableCombobox>;
|
||||
return React.createElement(EditableCombobox, otherProps, children);
|
||||
}
|
||||
|
||||
return <Combobox {...otherProps}>{children}</Combobox>;
|
||||
return React.createElement(Combobox, otherProps, children);
|
||||
}
|
||||
}
|
||||
|
||||
Picker.Item = class Item extends Component {
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
return <ComboboxItem>{children}</ComboboxItem>;
|
||||
return React.createElement(ComboboxItem, null, children);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
4
src/react-components/RadioButtons.js
vendored
4
src/react-components/RadioButtons.js
vendored
|
|
@ -5,14 +5,14 @@ import { RadioButton, RadioButtonItem } from '../';
|
|||
class RadioButtons extends Component {
|
||||
render() {
|
||||
const { children, ...otherProps } = this.props;
|
||||
return <RadioButton {...otherProps}>{children}</RadioButton>;
|
||||
return React.createElement(RadioButton, otherProps, children);
|
||||
}
|
||||
}
|
||||
|
||||
RadioButtons.Item = class Item extends Component {
|
||||
render() {
|
||||
const { children } = this.props;
|
||||
return <RadioButtonItem>{children}</RadioButtonItem>;
|
||||
return React.createElement(RadioButtonItem, null, children);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
4
src/react-components/Separator.js
vendored
4
src/react-components/Separator.js
vendored
|
|
@ -6,10 +6,10 @@ class Separator extends Component {
|
|||
render() {
|
||||
const { vertical, children, ...otherProps } = this.props;
|
||||
if (vertical) {
|
||||
return <VerticalSeparator {...otherProps} />;
|
||||
return React.createElement(VerticalSeparator, otherProps);
|
||||
}
|
||||
|
||||
return <HorizontalSeparator {...otherProps} />;
|
||||
return React.createElement(HorizontalSeparator, otherProps);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
6
src/react-components/TextInput.js
vendored
6
src/react-components/TextInput.js
vendored
|
|
@ -7,14 +7,14 @@ class TextInput extends Component {
|
|||
const { secure, multiline, children, ...otherProps } = this.props;
|
||||
|
||||
if (secure) {
|
||||
return <PasswordEntry {...otherProps}>{children}</PasswordEntry>;
|
||||
return React.createElement(PasswordEntry, otherProps, children);
|
||||
}
|
||||
|
||||
if (multiline) {
|
||||
return <MultilineEntry {...otherProps}>{children}</MultilineEntry>;
|
||||
return React.createElement(MultilineEntry, otherProps, children);
|
||||
}
|
||||
|
||||
return <Entry {...otherProps}>{children}</Entry>;
|
||||
return React.createElement(Entry, otherProps, children);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue