Skip to content

Commit

Permalink
Merge pull request #3 from okejminja/fix-mirt-options
Browse files Browse the repository at this point in the history
Fix options in MirtProps
  • Loading branch information
esdete2 authored Jun 1, 2024
2 parents 9f082bb + 9313185 commit b89f085
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.vscode
node_modules
dist
Expand Down
6 changes: 3 additions & 3 deletions src/Mirt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface MirtProps {
onError?: (error: Error) => void;
start?: number;
end?: number;
options?: MirtOptions;
options?: Partial<MirtOptions>;
}

export interface MirtOptions {
Expand All @@ -26,7 +26,7 @@ export interface MirtOptions {
fineTuningScale: number;
}

const defauiltOptions: MirtOptions = {
const defaultOptions: MirtOptions = {
showButton: true,
waveformColor: 'rgba(255, 255, 255, 0.5)',
waveformBlockWidth: 4,
Expand All @@ -48,7 +48,7 @@ const Mirt = ({
end: endValueOverwrite,
options,
}: MirtProps) => {
const config = { ...defauiltOptions, ...options };
const config = { ...defaultOptions, ...options };

const start = useRef<HTMLInputElement>(null);
const playhead = useRef<HTMLInputElement>(null);
Expand Down

0 comments on commit b89f085

Please sign in to comment.