Skip to content

Commit

Permalink
Merge pull request #22 from SimformSolutionsPvtLtd/fix/UNT-T8848
Browse files Browse the repository at this point in the history
Change wording and update READEME and gif
  • Loading branch information
mukesh-simform authored Jun 23, 2022
2 parents 97004bc + bf580a3 commit 6db973c
Show file tree
Hide file tree
Showing 11 changed files with 85 additions and 93 deletions.
138 changes: 65 additions & 73 deletions README.md

Large diffs are not rendered by default.

Binary file modified assets/RadialCircle.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/RadialSlider.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/RadialSliderExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/RadialSlider/CenterContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const CenterContent = (props: CenterContentProps) => {
isHideValue,
value,
centerContentStyle,
unitValueContenStyle,
unitValueContentStyle,
} = props;

return (
Expand All @@ -28,7 +28,7 @@ const CenterContent = (props: CenterContentProps) => {
</Text>
)}
{!isHideValue && (
<View style={[styles.hideValue, unitValueContenStyle]}>
<View style={[styles.hideValue, unitValueContentStyle]}>
<Text style={[styles.valueText, styles.large_header, valueStyle]}>
{value}
</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/components/RadialSlider/RadialSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ const RadialSlider = (props: RadialSliderProps & typeof defaultProps) => {
{linearGradient.map(
(
item: {
stop: NumberProp | undefined;
offset: NumberProp | undefined;
color: Color | undefined;
},
index: React.Key | null | undefined
) => (
<Stop key={index} offset={item.stop} stopColor={item.color} />
<Stop key={index} offset={item.offset} stopColor={item.color} />
)
)}
</LinearGradient>
Expand Down
4 changes: 2 additions & 2 deletions src/components/RadialSlider/SliderDefaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const defaultProps = {
lineColor: Colors.grey,
lineSpace: 3,
linearGradient: [
{ stop: '0%', color: Colors.pink },
{ stop: '100%', color: Colors.red },
{ offset: '0%', color: Colors.skyBlue },
{ offset: '100%', color: Colors.darkBlue },
],
onChange: (_v: number) => {},
onComplete: (_v: number) => {},
Expand Down
10 changes: 5 additions & 5 deletions src/components/RadialSlider/SpeedoMeter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const SpeedoMeter = (
max,
unitStyle,
value = 0,
unitValueContenStyle,
unitValueContentStyle,
} = props;

const {
Expand Down Expand Up @@ -90,12 +90,12 @@ const SpeedoMeter = (
{linearGradient?.map(
(
item: {
stop: NumberProp | undefined;
offset: NumberProp | undefined;
color: Color | undefined;
},
index: React.Key | null | undefined
) => (
<Stop key={index} offset={item.stop} stopColor={item.color} />
<Stop key={index} offset={item.offset} stopColor={item.color} />
)
)}
</LinearGradient>
Expand Down Expand Up @@ -138,9 +138,9 @@ const SpeedoMeter = (
<CenterContent
{...(props as object)}
value={sliderValue}
unitValueContenStyle={[
unitValueContentStyle={[
styles.centerText,
unitValueContenStyle,
unitValueContentStyle,
// eslint-disable-next-line react-native/no-inline-styles
{ marginLeft: unit?.length ? unit?.length * 5 : 10 },
]}
Expand Down
4 changes: 2 additions & 2 deletions src/components/RadialSlider/SpeedometerDefaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const defaultSpeedoMeterProps = {
lineColor: Colors.grey,
lineSpace: 3,
linearGradient: [
{ stop: '0%', color: Colors.skyBlue },
{ stop: '100%', color: Colors.darkBlue },
{ offset: '0%', color: Colors.skyBlue },
{ offset: '100%', color: Colors.darkBlue },
],
onChange: (_v: number) => {},
onComplete: (_v: number) => {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ exports[`RadialSlider component Match Snapshot 1`] = `
gradient={
Array [
0,
-21338,
-15756829,
1,
-1423360,
-16042895,
]
}
gradientTransform={null}
Expand Down
10 changes: 5 additions & 5 deletions src/components/RadialSlider/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ViewStyle, TextStyle, StyleProp } from 'react-native';
import type { Linecap } from 'react-native-svg';

type RadialSliderExcludedProps = {
unitValueContenStyle?: StyleProp<ViewStyle>;
unitValueContentStyle?: StyleProp<ViewStyle>;
markerCircleSize?: never;
markerCircleColor?: never;
markerPositionY?: never;
Expand All @@ -29,12 +29,12 @@ export type CenterContentProps = {
isHideValue?: boolean;
value?: number;
centerContentStyle?: StyleProp<ViewStyle>;
unitValueContenStyle?: StyleProp<ViewStyle>;
unitValueContentStyle?: StyleProp<ViewStyle>;
};

export type LineContentProps = {
radius?: number;
linearGradient?: { stop: string; color: string }[];
linearGradient?: { offset: string; color: string }[];
thumbBorderWidth?: number;
markerLineSize?: number;
lineColor?: string;
Expand Down Expand Up @@ -192,7 +192,7 @@ export type RadialSliderProps = {
/**
* Gradient color of selected track.
*/
linearGradient?: { stop: string; color: string }[];
linearGradient?: { offset: string; color: string }[];
/**
* Callback function which fired on change in track.
*/
Expand Down Expand Up @@ -322,7 +322,7 @@ export type SpeedoMeterProps = RadialSliderProps & {
/**
* SpeedoMeter content styling.
*/
unitValueContenStyle?: StyleProp<ViewStyle>;
unitValueContentStyle?: StyleProp<ViewStyle>;
/**
* Size for marker circle.
*/
Expand Down

0 comments on commit 6db973c

Please sign in to comment.