Implement isHidden

This commit is contained in:
Eric NGUYEN 2022-09-14 14:11:18 +02:00
parent 9f58203c86
commit c0a7a26874
2 changed files with 6 additions and 0 deletions

View file

@ -14,6 +14,7 @@ function HandleDragStart(event: React.DragEvent<HTMLButtonElement>): void {
export function Sidebar(props: ISidebarProps): JSX.Element { export function Sidebar(props: ISidebarProps): JSX.Element {
const listElements = props.componentOptions.map(componentOption => const listElements = props.componentOptions.map(componentOption =>
componentOption.IsHidden !== true &&
<button type="button" <button type="button"
className='justify-center transition-all sidebar-component' className='justify-center transition-all sidebar-component'
key={componentOption.Type} key={componentOption.Type}

View file

@ -98,6 +98,11 @@ export interface IAvailableContainer {
*/ */
IsDimensionBorrower?: boolean IsDimensionBorrower?: boolean
/**
* if true, hide the entry in the sidebar (default: false)
*/
IsHidden?: boolean
/** /**
* (optional) * (optional)
* Style of the <rect> * Style of the <rect>