Skip to content

Commit

Permalink
fix: change from or to null operator and other fixes suggested in PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathewtheCoder committed Feb 7, 2021
1 parent 4db200f commit 2e79ed3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/mobile/src/components/CountdownCircleTimer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const CountdownCircleTimer = (props) => {
)}
<Path
fill="none"
strokeWidth={trailStrokeWidth || strokeWidth}
strokeWidth={trailStrokeWidth ?? strokeWidth}
stroke={trailColor}
d={path}
/>
Expand Down
2 changes: 2 additions & 0 deletions packages/mobile/types/CountdownCircleTimer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export interface CountdownCircleTimerProps {
rotation?: 'clockwise' | 'counterclockwise'
/** Circle trail color - takes any valid color format (HEX, rgb, rgba, etc.). Default: #d9d9d9 */
trailColor?: string
/** Trail stroke width. */
trailStrokeWidth?: number
/** Play and pause animation. Default: false */
isPlaying?: boolean
/** Apples linear gradient on top of the circle. The gradient doesn't follow the circle path. Works best with two colors. Default: false */
Expand Down
1 change: 0 additions & 1 deletion packages/shared/utils/countdownCircleTimerDefaultProps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const countdownCircleTimerDefaultProps = {
size: 180,
strokeWidth: 12,
trailStrokeWidth: false,
trailColor: '#d9d9d9',
isPlaying: false,
strokeLinecap: 'round',
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/utils/countdownCircleTimerProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const countdownCircleTimerProps = {
children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
size: PropTypes.number,
strokeWidth: PropTypes.number,
trailStrokeWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.bool]),
trailStrokeWidth: PropTypes.number,
trailColor: PropTypes.string,
isPlaying: PropTypes.bool,
strokeLinecap: PropTypes.oneOf(['round', 'square']),
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/CountdownCircleTimer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const CountdownCircleTimer = ({
d={path}
fill="none"
stroke={trailColor}
strokeWidth={trailStrokeWidth || strokeWidth}
strokeWidth={trailStrokeWidth ?? strokeWidth}
/>
<path
d={path}
Expand Down
4 changes: 2 additions & 2 deletions packages/web/types/CountdownCircleTimer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export interface CountdownCircleTimerProps {
size?: number
/** Path stroke width. Default: 12 */
strokeWidth?: number
/** Trail stroke width Default: false */
trailStrokeWidth?: number | boolean
/** Trail stroke width */
trailStrokeWidth?: number
/** Path stroke line cap. Default: "round" */
strokeLinecap?: 'round' | 'square'
/** Progress path rotation direction. Default: "clockwise" */
Expand Down

0 comments on commit 2e79ed3

Please sign in to comment.