Momo Component Kits
Installing
Use yarn
yarn add momo-component-kits
Or npm
npm i momo-component-kits
Usage
MomoButton
import { MomoButton, MomoIcons, ButtonType } from 'momo-component-kits'
<MomoButton
text="Momo Button"
type={ButtonType.primary}
/>
<MomoButton
text="Momo Button"
type={ButtonType.primaryBorder}
/>
<MomoButton
icon={MomoIcons.ic_close_24}
text="Custom Text Style"
type={ButtonType.primaryBorder}
/>
MomoTextInput
BrandInfo
SelectionItem
MomoHintBox
Avatar
RoundTextInput
UserShortedInfo
IconText
UnderlineTextInput
CalculatorTextInput
Register keyboard for app
import {KeyboardCalculator} from 'momo-component-kits';
AppRegistry.registerComponent('KeyboardCalculator', () => KeyboardCalculator);
const keyboardTypeRegistry = {};
export function register(type, factory) {
keyboardTypeRegistry[type] = factory;
}
class CustomKeyboardContainer extends Component {
render() {
const { tag, type } = this.props;
const factory = keyboardTypeRegistry[type];
if (!factory) {
return null;
}
const Comp = factory();
return <Comp tag={tag} />;
}
}
AppRegistry.registerComponent('CustomKeyboard', () => CustomKeyboardContainer);
(Only work with CalculatorTextInput Keyboard)
MoneySuggestionList
MomoCardView
MomoCoverFlow
MomoCarousel
MomoSkeleton
Changes log
v0.10.38
Add new components
MomoCarousel
MomoSkeleton
MomoCoverFlow
MomoCardView
Components
See more details
Click here