Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
acharyakavita committed Nov 27, 2023
1 parent 5e60998 commit f3524db
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 31 deletions.
8 changes: 4 additions & 4 deletions packages/victory-area/src/area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ export const Area: React.FC<AreaProps> = (props) => {
props = evaluateProps(props);
const {
ariaLabel,
role="presentation",
shapeRendering="auto",
role = "presentation",
shapeRendering = "auto",
className,
polar,
origin,
data,
pathComponent=<Path />,
pathComponent = <Path />,
events,
groupComponent=<g />,
groupComponent = <g />,
clipPath,
id,
style,
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-bar/src/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const defaultProps = {
};
// eslint-disable-next-line prefer-arrow-callback
const Bar = forwardRef(function Bar(props, ref) {
props = evaluateProps({ ...defaultProps, ...props});
props = evaluateProps({ ...defaultProps, ...props });
const { polar, origin, style, barWidth, cornerRadius } = props;

const path = polar
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-candlestick/src/candle.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const defaultProps = {
};

const Candle = (props) => {
props = evaluateProps({ ...defaultProps, ...props});
props = evaluateProps({ ...defaultProps, ...props });
const {
ariaLabel,
events,
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-chart/src/victory-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const defaultProps = {
};

const VictoryChartImpl: React.FC<VictoryChartProps> = (initialProps) => {
initialProps = {...defaultProps,...initialProps}
initialProps = { ...defaultProps, ...initialProps };
const role = "chart";
const { getAnimationProps, setAnimationState, getProps } =
Hooks.useAnimationState();
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-core/src/victory-label/victory-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ export const VictoryLabel: {
role: string;
defaultStyles: typeof defaultStyles;
} & React.FC<VictoryLabelProps> = (props) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });

if (props.text === null || props.text === undefined) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-core/src/victory-primitives/arc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const defaultProps = {
};

export const Arc = (props: ArcProps) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });

return React.cloneElement(props.pathComponent!, {
...props.events,
Expand Down
3 changes: 1 addition & 2 deletions packages/victory-core/src/victory-primitives/background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const defaultProps = {
};

export const Background = (props: BackgroundProps) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });

return props.polar
? React.cloneElement(props.circleComponent!, {
Expand Down Expand Up @@ -77,4 +77,3 @@ Background.propTypes = {
x: PropTypes.number,
y: PropTypes.number,
};

4 changes: 2 additions & 2 deletions packages/victory-core/src/victory-primitives/border.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const defaultProps = {
};

export const Border = (props: BorderProps) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });

return React.cloneElement(props.rectComponent!, {
...props.events,
Expand All @@ -71,4 +71,4 @@ Border.propTypes = {
width: PropTypes.number,
x: PropTypes.number,
y: PropTypes.number,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultProps = {
};

export const LineSegment = (props: LineSegmentProps) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });

return React.cloneElement(props.lineComponent!, {
...props.events,
Expand Down
3 changes: 1 addition & 2 deletions packages/victory-core/src/victory-primitives/point.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const defaultProps = {
};

export const Point = (props: PointProps) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });
const userProps = UserProps.getSafeUserProps(props);

return React.cloneElement(props.pathComponent!, {
Expand Down Expand Up @@ -115,4 +115,3 @@ Point.propTypes = {
x: PropTypes.number,
y: PropTypes.number,
};

2 changes: 1 addition & 1 deletion packages/victory-core/src/victory-primitives/whisker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const defaultProps = {
};

export const Whisker = (props: WhiskerProps) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });
const {
ariaLabel,
groupComponent,
Expand Down
3 changes: 1 addition & 2 deletions packages/victory-errorbar/src/error-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const defaultProps = {
};

export const ErrorBar = (props: ErrorBarProps & typeof ErrorBar.default) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });
const { groupComponent } = props;
const userProps = UserProps.getSafeUserProps(props);
const { tabIndex, ariaLabel } = props;
Expand Down Expand Up @@ -158,4 +158,3 @@ ErrorBar.propTypes = {
x: PropTypes.number,
y: PropTypes.number,
};

3 changes: 1 addition & 2 deletions packages/victory-group/src/victory-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const VictoryGroupBase: React.FC<VictoryGroupProps> = (initialProps) => {
const role = VictoryGroup?.role;
const { getAnimationProps, setAnimationState, getProps } =
Hooks.useAnimationState();
initialProps = {...defaultProps,...initialProps}
initialProps = { ...defaultProps, ...initialProps };
const props = getProps(initialProps);

const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
Expand Down Expand Up @@ -197,7 +197,6 @@ VictoryGroupBase.propTypes = {
offset: PropTypes.number,
};


const componentConfig: VictoryComponentConfiguration<VictoryGroupProps> = {
role: "group",
expectedComponents: [
Expand Down
3 changes: 1 addition & 2 deletions packages/victory-line/src/curve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const defaultProps = {
};

export const Curve: React.FC<CurveProps> = (props) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });
const userProps = UserProps.getSafeUserProps(props);
const { polar, origin } = props;
const lineFunction = LineHelpers.getLineFunction(props);
Expand Down Expand Up @@ -77,7 +77,6 @@ Curve.propTypes = {
polar: PropTypes.bool,
};


export interface CurveProps extends VictoryCommonPrimitiveProps {
ariaLabel?: StringOrCallback;
// eslint-disable-next-line @typescript-eslint/ban-types
Expand Down
5 changes: 2 additions & 3 deletions packages/victory-native/src/helpers/wrap-core-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import React from "react";
* @returns {React.FC} WrappedComponent Wrapped component (passes props through)
*/
export const wrapCoreComponent = ({ Component, defaultProps }) => {

const WrappedComponent = (props) => {
props={...defaultProps,...props};
return <Component {...props} />
props = { ...defaultProps, ...props };
return <Component {...props} />;
};

/**
Expand Down
3 changes: 1 addition & 2 deletions packages/victory-pie/src/slice.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ const defaultProps = {
shapeRendering: "auto",
};


const Slice = (props) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });
const defaultTransform = props.origin
? `translate(${props.origin.x}, ${props.origin.y})`
: undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-stack/src/victory-stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const defaultProps = {
const VictoryStackBase = (initialProps: VictoryStackProps) => {
// eslint-disable-next-line no-use-before-define
const { role } = VictoryStack;
initialProps = {...defaultProps,...initialProps}
initialProps = { ...defaultProps, ...initialProps };
const { setAnimationState, getAnimationProps, getProps } =
Hooks.useAnimationState();

Expand Down
2 changes: 1 addition & 1 deletion packages/victory-tooltip/src/flyout.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const defaultProps = {
};

const Flyout = (props) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });
const userProps = UserProps.getSafeUserProps(props);

return React.cloneElement(props.pathComponent, {
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-voronoi/src/voronoi.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultProps = {
};

const Voronoi = (props) => {
props = evaluateProps({...defaultProps,...props});
props = evaluateProps({ ...defaultProps, ...props });

const {
ariaLabel,
Expand Down

0 comments on commit f3524db

Please sign in to comment.