-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: support template literals in object properties and jsx props #146
Conversation
451f7fe
to
59ed07a
Compare
782a0d5
to
8ce4330
Compare
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
==========================================
- Coverage 97.57% 97.51% -0.06%
==========================================
Files 20 19 -1
Lines 412 403 -9
Branches 80 81 +1
==========================================
- Hits 402 393 -9
Misses 10 10
Continue to review full report at Codecov.
|
title = parent.node.name.name; | ||
} else { | ||
title = parent.node.key.name; | ||
} |
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.
You should generate unique id after this line, otherwise the following will generate the same classnames:
const a = { header: css`...` }
const b = { header: css`...` }
// or
<article className={css`...`} />
<div>
<article className={css`...`} />
</div>
Maybe title = path.scope.generateUidIdentifier(title).name
.
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.
This will become a major problem if we settle on using filename
in production also (#147).
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.
@zamotany will the unique id be consistent across builds?
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
1c65755
to
549ef20
Compare
549ef20
to
487dd78
Compare
fixes #134, #138