Skip to content

Commit

Permalink
fix default values
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Yang committed Apr 13, 2020
1 parent 88ea8a5 commit 680fad0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/SplitFlapDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { NUMERIC } from './constants';
import SplitFlapCharacter from './Character';

export interface SplitFlapDisplayProps {
background: string;
background?: string;
borderColor: string;
borderWidth: string;
characterSet: Array<string>;
Expand Down Expand Up @@ -76,17 +76,17 @@ const getMinLengthFill = (
};

const SplitFlapDisplay = ({
background,
borderColor,
borderWidth,
characterSet,
characterWidth,
fontSize,
minLength,
padDirection,
step,
textColor,
value,
background = defaultProps.background,
borderColor = defaultProps.borderColor,
borderWidth = defaultProps.borderWidth,
characterSet = defaultProps.characterSet,
characterWidth = defaultProps.characterWidth,
fontSize = defaultProps.fontSize,
minLength = defaultProps.minLength,
padDirection = defaultProps.padDirection,
step = defaultProps.step,
textColor = defaultProps.textColor,
value = defaultProps.value,
}: SplitFlapDisplayProps = defaultProps) => {
const initialValue = Array(value.length).fill(characterSet[0]).join('');
const [prevValue, setPrevValue] = useState<string>(initialValue);
Expand Down

0 comments on commit 680fad0

Please sign in to comment.