Skip to content

Commit

Permalink
fix(exoflex): pass onPress in chips and fix SwitchProps typo (#421)
Browse files Browse the repository at this point in the history
* fix: pass onPress prop to Touchable in Chip

* fix: typo in SwitchProps
  • Loading branch information
listiani13 authored Mar 30, 2020
1 parent ff37001 commit ea1f6f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/exoflex/src/components/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function Chip({
<TouchableOpacity
activeOpacity={0.7}
disabled={!onPress}
onPress={onPress}
style={[
styles.root,
isActive
Expand Down
4 changes: 2 additions & 2 deletions packages/exoflex/src/components/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TouchableOpacity, Animated, StyleProp, ViewStyle } from 'react-native';

import useTheme from '../helpers/useTheme';

export type SwithcProps = {
export type SwitchProps = {
value: boolean;
onValueChange: (value?: boolean) => void;
disabled: boolean;
Expand All @@ -15,7 +15,7 @@ export type SwithcProps = {

const MARGIN = 2;

export default function Switch(props: SwithcProps) {
export default function Switch(props: SwitchProps) {
let {
value,
width,
Expand Down
4 changes: 2 additions & 2 deletions packages/exoflex/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { RadioButtonProps } from './components/RadioButton';
import { RichRadioButtonProps } from './components/RichRadioButton';
import { SegmentedControlProps } from './components/SegmentedControl/SegmentedControl';
import { SliderProps } from './components/Slider';
import { SwithcProps } from './components/Switch';
import { SwitchProps } from './components/Switch';
import { TextProps } from './components/Text';
import { TextInputProps } from './components/TextInput/types';
import { TimePickerProps } from './components/TimePicker/types';
Expand Down Expand Up @@ -107,7 +107,7 @@ export type Theme = {
| 'trackStyle'
| 'unselectedStyle'
>;
switch: Pick<SwithcProps, 'thumbStyle' | 'trackStyle'>;
switch: Pick<SwitchProps, 'thumbStyle' | 'trackStyle'>;
text: Pick<TextProps, 'style'>;
textInput: Pick<
TextInputProps,
Expand Down

0 comments on commit ea1f6f7

Please sign in to comment.