react-native-box-lite
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "react-native-box-lite", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"scripts": { | ||
@@ -34,7 +34,5 @@ "lint": "eslint .", | ||
"keywords": [ | ||
"react-native", | ||
"react-native-box", | ||
"react-native-box-lite", | ||
"react native switch", | ||
"react native progress bar", | ||
"react native progress circle", | ||
"react-native-components", | ||
@@ -44,3 +42,2 @@ "react-native-styles", | ||
"react-native-text", | ||
"react-native", | ||
"radio button", | ||
@@ -47,0 +44,0 @@ "checkbox", |
@@ -0,0 +0,0 @@ # react-native-box-lite |
@@ -10,2 +10,3 @@ import Text from './text'; | ||
import ProgressCircle from './progressCircle'; | ||
import SliderBox from './sliderBox'; | ||
@@ -22,2 +23,3 @@ export { | ||
ProgressCircle, | ||
SliderBox, | ||
}; |
@@ -0,0 +0,0 @@ export const COLORS = { |
@@ -56,2 +56,3 @@ import {BORDER_RADIUS, LINE_HEIGHT_SIZE, SIZE_SPACE, TEXT_SIZE} from './Spaces'; | ||
success: '#4ADE80', | ||
overlay: 'rgba(0, 0, 0, 0.22)', | ||
'primary-light': '#AFD1FC', | ||
@@ -58,0 +59,0 @@ 'secondary-light': '#E1BEE7', |
@@ -0,0 +0,0 @@ export const SIZE_SPACE = { |
@@ -0,0 +0,0 @@ declare module '*.png' { |
@@ -0,0 +0,0 @@ import useClassName from './useClassName'; |
@@ -0,0 +0,0 @@ export * from './utils'; |
@@ -0,0 +0,0 @@ export enum ScaleType { |
@@ -6,2 +6,4 @@ import { | ||
ImageStyle, | ||
NativeScrollEvent, | ||
ScrollViewProps, | ||
StyleProp, | ||
@@ -27,3 +29,3 @@ TextProps, | ||
classNameText?: string; | ||
isDebounce?: boolean; | ||
enableDebounce?: boolean; | ||
delayDebounce?: number; | ||
@@ -47,3 +49,3 @@ varian?: Varian; | ||
iconSize?: number; | ||
isDebounce?: boolean; | ||
enableDebounce?: boolean; | ||
delayDebounce?: number; | ||
@@ -69,3 +71,3 @@ resizeMode?: ImageResizeMode; | ||
sizeChildren?: number; | ||
isDebounce?: boolean; | ||
enableDebounce?: boolean; | ||
delayDebounce?: number; | ||
@@ -108,1 +110,30 @@ varian?: VarianColor; | ||
} | ||
export interface SliderBoxProps<ItemT = any> extends ScrollViewProps { | ||
classBox: string; | ||
classSlider: string; | ||
classSliderItem: string; | ||
classPageItem: string; | ||
classPagination: string; | ||
data: ItemT[]; | ||
showPagination: boolean; | ||
currentIndex: number; | ||
width?: number; | ||
itemWidth?: number; | ||
sliderWidth?: number; | ||
enableAnimation: boolean; | ||
enableControl: boolean; | ||
space: number; | ||
iconNext?: ReactNode; | ||
iconPrev?: ReactNode; | ||
iconColor?: string; | ||
renderSliderItem: (item: ItemT, index: number) => ReactNode; | ||
renderPageItem?: (item: ItemT, index: number) => ReactNode; | ||
onIndexChanged?: (index: number) => void; | ||
onEndReached?: () => void; | ||
} | ||
export interface OnEndReachedProps extends NativeScrollEvent { | ||
space: number; | ||
itemWidth: number; | ||
horizontal?: boolean | null; | ||
} |
@@ -0,0 +0,0 @@ export * from './classStyle'; |
@@ -0,0 +0,0 @@ import {StyleSheet} from 'react-native'; |
@@ -20,3 +20,3 @@ import {flexStyles} from './Flex.styles'; | ||
export const getClassNameStyles = (className: string) => { | ||
export const getClassNameStyles = (className: string): Object => { | ||
try { | ||
@@ -23,0 +23,0 @@ if (className.length > 0) { |
@@ -0,0 +0,0 @@ import {StyleSheet} from 'react-native'; |
export * from './ClassStyles'; |
@@ -0,0 +0,0 @@ import {StyleSheet} from 'react-native'; |
@@ -0,0 +0,0 @@ import {StyleSheet} from 'react-native'; |
@@ -0,0 +0,0 @@ import {StyleSheet} from 'react-native'; |
@@ -0,0 +0,0 @@ import {StyleSheet} from 'react-native'; |
@@ -1,1 +0,19 @@ | ||
export const classNames = (...classes: string[]): string => classes.join(' '); | ||
import {OnEndReachedProps} from '../model'; | ||
export const classNames = (...classes: (string | undefined)[]): string => | ||
classes.filter(Boolean).join(' '); | ||
export const isEndReachedScroll = ({ | ||
layoutMeasurement, | ||
contentOffset, | ||
contentSize, | ||
space, | ||
horizontal, | ||
}: OnEndReachedProps) => { | ||
const offset = horizontal ? contentOffset.x : contentOffset.y; | ||
const layoutSize = horizontal | ||
? layoutMeasurement.width | ||
: layoutMeasurement.height; | ||
const content = horizontal ? contentSize.width : contentSize.height; | ||
return layoutSize + offset >= content - space; | ||
}; |
export * from './resize.util'; | ||
export * from './helper.util'; |
@@ -0,0 +0,0 @@ import {Dimensions, NativeModules, Platform} from 'react-native'; |
@@ -0,0 +0,0 @@ import {CONFIG_BOX} from '../config'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
394550
51
6627