-
Notifications
You must be signed in to change notification settings - Fork 9
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
LG-3814: MongoNav LiveExample + CodeDocs #333
base: staging
Are you sure you want to change the base?
Conversation
package.json
Outdated
@@ -88,6 +87,7 @@ | |||
"@leafygreen-ui/tokens": "^2.2.0", | |||
"@leafygreen-ui/tooltip": "^11.0.0", | |||
"@leafygreen-ui/typography": "^18.0.1", | |||
"@lg-private/mongo-nav": "^13.1.2", |
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.
bump
@@ -92,6 +92,7 @@ export const Knob = ({ | |||
value={value} | |||
onChange={onChange} | |||
className={cx(inputStyle, rest.className)} | |||
popoverZIndex={999} |
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.
🚩Do we need this?
utils/_getComponentResources.tsx
Outdated
let namespace = '@leafygreen-ui'; | ||
|
||
if (PRIVATE_PACKAGES.includes(componentName)) { | ||
namespace = '@lg-private'; | ||
} |
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.
const namespace = PRIVATE_PACKAGES.includes(componentName) ? '@lg-private' : '@leafygreen-ui'
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 wrote this this way since if we were to include lg-chat
in the future, we'd want if / else if
utils/_getComponentResources.tsx
Outdated
let namespace = '@leafygreen-ui'; | ||
|
||
if (PRIVATE_PACKAGES.includes(componentName)) { | ||
namespace = '@lg-private'; | ||
} |
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.
same ternary here
utils/_getComponentResources.tsx
Outdated
let namespace = '@leafygreen-ui'; | ||
if (typeof componentName !== 'string') return null; | ||
|
||
if (PRIVATE_PACKAGES.includes(componentName)) { | ||
namespace = '@lg-private'; | ||
} | ||
|
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.
ternary here as well
utils/getComponentStories.ts
Outdated
let namespace = '@leafygreen-ui'; | ||
|
||
if (PRIVATE_PACKAGES.includes(kebabName)) { | ||
namespace = '@lg-private'; | ||
} | ||
|
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.
ternary here too
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.
(could also create a getNamespaceFromPackageName
function for future extensibility)
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 that
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.
Left some comments
No description provided.