-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added charMap property in Digit. Added Story for additional character… #3
Added charMap property in Digit. Added Story for additional character… #3
Conversation
… in charMap. Exported default character to variable. Added Story for illegal character. Added .gitignore
I'm loaded on work right now, but I'll review this PR soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the changes proposed, I think it's a good idea. Thanks for taking the time, let me know what you think about the changes I requested.
@@ -1,6 +1,7 @@ | |||
import { Meta, StoryObj } from "@storybook/react"; | |||
|
|||
import { Digit } from "../components/Digit"; | |||
import CharToDigit from "../utils/charToDigit"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, the import should be chatToDigit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite get it? Do I have a typo? Do you😅?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a typo. Since utils/charToDigit.ts
exports charToDigit
by default, you can rename it when you import it, that's why this code works anyways. But it should be charToDigit
since it is the array that you want and not the type. Don't worry, I'll merge the PR and then fix it.
src/utils/charToDigit.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of giving this type a name, but I would like it to be a type
and not an interface
(for consistency). On top of that, let's change the name to CharMap (without an I at the start). Also, if you think it's a good idea, change charToDigit
to defaultCharMap
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed all these
c675120
to
f1663e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you for your contributions!
… in charMap. Exported default character to variable. Added Story for illegal character. Added .gitignore