feat: add tooltip element to the builder#246
Conversation
👷 Deploy request for carbon-components-builder pending review.Visit the deploys page to approve it
|
794108b to
da47417
Compare
| <AComponent | ||
| componentObj={componentObj} | ||
| rejectDrop={true} | ||
| // className={css`position: relative; display: inline-flex`} |
| select={select} | ||
| remove={remove} | ||
| selected={selected}> | ||
|
|
There was a problem hiding this comment.
?
Also, if there's no children, it should be a self-closing tag, no? <Tooltip ... />
| placement: 'top', | ||
| alignment: 'center', |
There was a problem hiding this comment.
are these default values? if yes, we don't (shouldn't) need to specify them, if bloats the json.
| outputs: () => '', | ||
| imports: ['TooltipModule'], | ||
| code: ({ json }) => { | ||
| return `<div class="bx--tooltip__label"> |
There was a problem hiding this comment.
can be inline (without the return statement)?
| react: { | ||
| imports: ['Tooltip'], | ||
| code: ({ json }) => { | ||
| return `<Tooltip |
There was a problem hiding this comment.
can be inline (without the return statement)?
| return <Tooltip | ||
| description={state.description} | ||
| direction={state.placement ? state.placement : 'top'} | ||
| align={state.alignment ? state.alignment : 'center'} |
| } | ||
| return <Tooltip | ||
| description={state.description} | ||
| direction={state.placement ? state.placement : 'top'} |
There was a problem hiding this comment.
Why is it "placement" if the property it's used for is "direction"?
Also, how will this change in v11?
Signed-off-by: Max You <JianzhongMax.You@ibm.com>
Signed-off-by: Max You <max.you@outlook.com>
Signed-off-by: Max You <max.you@outlook.com>
Signed-off-by: Max You <JianzhongMax.You@ibm.com>
Signed-off-by: Max You <JianzhongMax.You@ibm.com>
|
Verified that the component features and export works. |
Signed-off-by: Max You <JianzhongMax.You@ibm.com>
zvonimirfras
left a comment
There was a problem hiding this comment.
input and output names should be camelCase
| className={css`${styleObjectToString(componentObj.style)}`} | ||
| definition={componentObj.definition} | ||
| align={componentObj.alignment}> | ||
| {componentObj.description} |
There was a problem hiding this comment.
In both frameworks description is a child, so why don't we do that here too? Meaning description wouldn't be part of the componentObj.description - instead we just let items render.
There was a problem hiding this comment.
we stick with support only text only for now
Co-authored-by: Zvonimir Fras <zvonimir.fras@gmail.com>
Signed-off-by: Max You <JianzhongMax.You@ibm.com>
closes #132