-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add button * Add random string * Switch string visibility does not move other div * Cleaning * remove button
- Loading branch information
1 parent
d11d2d1
commit 3fc08a3
Showing
12 changed files
with
93 additions
and
37 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { Note } from "../../config/Notes"; | ||
import { Note } from "../../config"; | ||
|
||
export const NotesList = ({ notes }: { notes: Note[] }) => { | ||
export const NotesList = ({ | ||
notes, | ||
GuitarStringDecorator, | ||
}: { | ||
notes: Note[]; | ||
GuitarStringDecorator?: React.ReactNode; | ||
}) => { | ||
return ( | ||
<div className="flex flex-col md:flex-row md:gap-7 text-[35px] md:text-[45px] mt-6 mb-6 font-bold"> | ||
{notes.map((note: Note, index: number) => <div key={index}>{note}</div>)} | ||
</div> | ||
<> | ||
<div className="text-[25px] md:text-[25px] font-bold text-neutral-500">{GuitarStringDecorator}</div> | ||
<div className="flex flex-col md:flex-row md:gap-7 text-[35px] md:text-[45px] mb-6 font-bold"> | ||
{notes.map((note: Note, index: number) => ( | ||
<div key={index}>{note}</div> | ||
))} | ||
</div> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './Button'; | ||
export * from './NotesList'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export enum GuitarStrings { | ||
String1 = 'String 1', | ||
String2 = 'String 2', | ||
String3 = 'String 3', | ||
String4 = 'String 4', | ||
String5 = 'String 5', | ||
String6 = 'String 6', | ||
} | ||
|
||
export type GuitarString = keyof typeof GuitarStrings; | ||
|
||
export const guitarStrings = Object.values(GuitarStrings) as unknown as GuitarString[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './Notes'; | ||
export * from './GuitarStrings'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './noteService' | ||
export * from './stringService' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { GuitarString, guitarStrings } from "../config"; | ||
|
||
export const getRandomString = (): GuitarString => { | ||
return guitarStrings[Math.floor(Math.random()*guitarStrings.length)]; | ||
}; |