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
MomoTypography
MomoToast
MomoLine
Changes log
v0.10.39.1
New components
Update
- add show and hide function
v0.10.39
New components
Update
- fix bugs: header show when scroll to bottom
- add focusBorderColor, focusBackgroundColor
- add rightComponent
- able to hide rightIcon
Components
See more details
Click here