-
Notifications
You must be signed in to change notification settings - Fork 149
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
feat(Amount): add new props & remove prefix
#1987
Conversation
|
✅ PR title follows Conventional Commits specification. |
prefix\
prefix\
prefix
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7d7db80:
|
* | ||
* @default false | ||
*/ | ||
isStrikethrough?: boolean; |
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.
nit: wouldn't shouldStrikethrough
be more suitable?
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.
All our booleans are either has*
or is*
. We don't use should*
for booleans anywhere. I think isStrikethrough
makes sense here
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'm fine with either isStrikethrough
or hasStrikethrough
.
borderBottomStyle="solid" | ||
position="absolute" | ||
width="100%" | ||
top="50%" |
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.
will top 50% be always correct? we use rems and if we increase or decrease fontsize of browser then I hope the place of line doesn't changes?
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, 50% will always be in the middle of the amount value.
...es/blade/src/components/Collapsible/__tests__/__snapshots__/Collapsible.native.test.tsx.snap
Outdated
Show resolved
Hide resolved
@@ -84,6 +87,7 @@ export const BaseText = ({ | |||
textAlign={textAlign} | |||
numberOfLines={truncateAfterLines} | |||
wordBreak={wordBreak} | |||
opacity={opacity} |
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 think we should expose opacity. This will make base text colors unpredictable and will always rely on the background color. Lets speak with the design team once to confirm this
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.
As consulted with design, we have now increased the opacity to 64%.
@chaitanyadeorukhkar This is as per the designs. |
We have updated it to strike through whole component (including currency-symbol/code) after consulting with the designers. |
const currencyPositionMapping: Record<string, string> = { | ||
DZD: 'right', | ||
BHD: 'right', | ||
OMR: 'right', | ||
KWD: 'right', | ||
}; |
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.
Will these get filled with more currencies later?
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.
@anuraghazra Yes.
prefix
prop in favor of the newcurrencyIndicator
prop.currencyIndicator
: Determines the visual representation of the currency (symbol or code).isStrikethrough
: If true, the amount value will have a line through it.