-
Notifications
You must be signed in to change notification settings - Fork 929
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
API Reference: UI: Explore Component API #6444
Conversation
…and interfaceDeclaration
@@ -0,0 +1 @@ | |||
export * from './table-row'; |
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.
please dont *
flex-direction: column; | ||
overflow: auto; | ||
height: 100%; | ||
font-size: 14px; |
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.
use css vars
export function useUpdatedUrlFromQuery(queryParams: APIRefQueryParams): string { | ||
const query = useQuery(); | ||
const location = useLocation() || { pathname: '/' }; | ||
// @ts-ignore |
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.
try to remove
width: 100%; | ||
} | ||
.apiNodeDetailsComment { | ||
font-size: var(--bit-p-xs); |
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.
fallback
} | ||
.apiNodeDetailsLocationContainer { | ||
display: flex; | ||
flex-direction: row; |
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.
row by default
@@ -0,0 +1,145 @@ | |||
/* eslint-disable @typescript-eslint/no-unused-vars */ |
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.
?
@@ -0,0 +1,49 @@ | |||
@import '~@teambit/ui-foundation.ui.constants.z-indexes/z-indexes.module.scss'; |
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.
seems to be copy pasted from split pane.
can we reuse the original component? or even its shared css?
import { ConstructorSchema, SchemaNode } from '@teambit/semantics.entities.semantic-schema'; | ||
|
||
export function transformSignature({ __schema, signature }: SchemaNode): string | undefined { | ||
let displaySignature: string | undefined; |
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.
can we just return the value instead of mutating displaySignature
?
@@ -10,6 +10,7 @@ export const BasicButton = () => { | |||
/** | |||
* example of passing a JSX Element as a parameter | |||
*/ | |||
// eslint-disable-next-line react/prop-types |
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.
?
@@ -12,6 +12,7 @@ | |||
line-height: 1.2em; | |||
padding-right: 8px; | |||
font-size: var(--bit-p-xs); | |||
line-height: 16px; |
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 already have line height. please remove this
Proposed Changes
APIReferenceUIRuntime
: UI Runtime that extends the Component UI to add a new API Reference Tab, and allows users to override default renderers for each API nodeAPIReferencePage
: Component UI Tab that renders the entire API for a given component versionAPIExplorer
: An API file tree, grouped by Type (Classes, Enums, Functions, Interfaces, Variables, etc). Allows users to explore and navigate to a specific API nodeclassRenderer
typeRenderer
interfaceRenderer
variableRenderer
functionRenderer
enumRenderer
unresolvedRenderer
typeRefRenderer
typeIntersectionRenderer
typeUnionRenderer
parameterRenderer
typeLiteralRenderer
inferenceTypeRenderer
typeArrayRenderer