Skip to content

Commit 7100f48

Browse files
committed
feat(*): remove unused features
1 parent fcfefae commit 7100f48

10 files changed

Lines changed: 194 additions & 162 deletions

File tree

src/components/Button/BackButton.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/components/Button/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
export * from './Button';
2-
export * from './BackButton';

src/components/Pickers/FlexiblePicker.tsx

Whitespace-only changes.

src/components/Pickers/NativePicker.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useTheme } from '../../theme';
55
import { mergeStyles } from '../../utils/mergeStyles';
66
import { GetPickerButtonStylesProp } from './PickerButton';
77
import { getPickerButtonStyles, PickerButtonSize } from './PickerButton.styles';
8+
import { PickerButtonWrapper } from './PickerButtonWrapper';
89

910
export interface NativePickerProps extends RNPickerProps {
1011
size?: PickerButtonSize;
@@ -25,12 +26,14 @@ const NativePickerBase = (props: NativePickerProps) => {
2526
)({ size }, theme);
2627

2728
return (
28-
<RNPicker
29-
ref={innerRef}
30-
itemStyle={itemStyle}
31-
style={pickerStyle}
32-
{...pickerProps}
33-
/>
29+
<PickerButtonWrapper>
30+
<RNPicker
31+
ref={innerRef}
32+
itemStyle={itemStyle}
33+
style={pickerStyle}
34+
{...pickerProps}
35+
/>
36+
</PickerButtonWrapper>
3437
);
3538
};
3639

src/components/Pickers/PickerButton.styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export const getPickerButtonStyles: GetPickerButtonStyles = (
103103
...textSizeStyles,
104104
},
105105
pickerStyle: {
106+
appearance: 'none',
106107
backgroundColor: 'transparent',
107108
width: '100%',
108109
...base,

src/components/Slider/Slider.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { Slider } from '.';
1313
<Playground>
1414
<Slider
1515
size={40}
16-
value={0.3}
16+
initialValue={0.3}
1717
step={0}
1818
minimumValue={0}
1919
maximumValue={1}
@@ -31,11 +31,11 @@ import { Slider } from '.';
3131

3232
### With Range
3333

34-
By using `value` as an array of `[number, number]`, it will automatically translate it into a range slider. The minimum range is the value of the step
34+
By using `initialValue` as an array of `[number, number]`, it will automatically translate it into a range slider. The minimum range is the value of the step
3535

3636
<Playground>
3737
<Slider
38-
value={[30, 60]} // This is an [number, number] instead of a number
38+
initialValue={[30, 60]} // This is an [number, number] instead of a number
3939
step={5}
4040
minimumValue={0}
4141
maximumValue={100}

src/components/Slider/Slider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface SliderProps {
3535
* *This is not a controlled component*; you don't need to update the
3636
* value during dragging.
3737
*/
38-
value?: SliderValue;
38+
initialValue?: SliderValue;
3939

4040
/**
4141
* Step value of the slider. The value should be
@@ -136,7 +136,7 @@ const setRightValue = (
136136

137137
export const Slider = (props: SliderProps) => {
138138
const {
139-
value: defaultValue = 0,
139+
initialValue = 0,
140140
onSlidingStart = () => undefined,
141141
onSlidingComplete = () => undefined,
142142
onValueChange = () => undefined,
@@ -147,7 +147,7 @@ export const Slider = (props: SliderProps) => {
147147
getStyles,
148148
} = props;
149149

150-
const [value, setValue] = React.useState(defaultValue);
150+
const [value, setValue] = React.useState(initialValue);
151151
const [isSliding, setIsSliding] = React.useState(false);
152152
const [trackMeasurements, setTrackMeasurements] = React.useState(
153153
initialMeasurements,

src/components/Typography/Link.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/components/Typography/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export * from './Code';
22
export * from './Heading';
33
export * from './Label';
4-
export * from './Link';
54
export * from './NumberedList';
65
export * from './Paragraph';
76
export * from './BulletItem';

0 commit comments

Comments
 (0)