@bluebeex/shared-components

v0.1.2

Published

Blue Bee Shared Component Library

Readme

@bluebeex/shared-components

Thư viện shared components cho ứng dụng Blue Bee.

Cài đặt

npm install @bluebeex/shared-components
# hoặc
yarn add @bluebeex/shared-components

Peer Dependencies

Package này yêu cầu các thư viện sau đã được cài đặt trong host app:

npm install react react-native
npm install @gorhom/bottom-sheet
npm install react-native-safe-area-context
npm install react-native-keyboard-controller
npm install react-native-reanimated
npm install react-native-gesture-handler
npm install @d11/react-native-fast-image

Lưu ý: Các thư viện này cần được cấu hình đúng theo hướng dẫn của từng thư viện (linking, Babel config, etc.)

Sử dụng

Components

import { 
  AISText,
  AISButton,
  AISBottomSheet,
  AISHeaderBar,
  AISPage,
  AISTouchable,
  BBIcon,
  Colors
} from '@bluebeex/shared-components';

function MyScreen() {
  return (
    <AISPage headerProps={{ title: 'My Screen' }}>
      <AISText>Hello World</AISText>
      <AISButton onPress={() => {}} title="Click me" />
    </AISPage>
  );
}

Exported Components

  • Text: AISText
  • Button: AISButton, AISButtonGroup
  • Page: AISPage, AISScrollView
  • Header: AISHeaderBar
  • Bottom Sheet: AISBottomSheet
  • Touchable: AISTouchable
  • Icons: BBIcon, BBIcons, BBIconSize
  • Image: AISFastImage
  • Input: AISTextArea, AISTextInput
  • Switch: AISSwitch
  • Popup: Popup components
  • Theme: Colors, Fonts, SizeGlobal

Development

Build

npm run build

Publish

# Đăng nhập npm (chỉ cần làm 1 lần)
npm login

# Publish lên npm
npm publish

License

MIT