Skip to content

Commit

Permalink
feat: add serializable props for StatelessStepper component
Browse files Browse the repository at this point in the history
  • Loading branch information
romaniukua committed Apr 23, 2020
1 parent c1ac3ce commit b650f1a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions packages/fscomponents/src/components/StatelessStepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,31 @@ const icons: {[key: string]: ImageURISource} = {
decrease: require('../../assets/images/decreaseImage.png')
};

export interface StatelessStepperProps {
export interface SerializableStatelessStepperProps {
format?: 'horizontalCenter' | 'horizontalLeft' | 'vertical';
onChange?: (count: number) => void;

// Stepper style
stepperStyle?: StyleProp<ViewStyle>;
stepperStyle?: ViewStyle;

// Counter
count: number;
countUpperLimit?: number;
counterStyle?: StyleProp<TextStyle>;
counterStyle?: TextStyle;
editable?: boolean;
prefix?: string;
}

export interface StatelessStepperProps extends Omit<SerializableStatelessStepperProps,
'stepperStyle' |
'counterStyle'
> {
onChange?: (count: number) => void;

// Stepper style
stepperStyle?: StyleProp<ViewStyle>;

// Counter
counterStyle?: StyleProp<TextStyle>;
renderText?: (text: string, style: StyleProp<TextStyle>, value: number) => React.ReactNode;

// Decrease button
Expand Down

0 comments on commit b650f1a

Please sign in to comment.