param type param attrs param text export function createShape ( type , attrs , text = '' ) { const el = document . createElementNS ( 'http://www.w3.org/2000/svg' , type ) ; Object . keys ( attrs ) . forEach ( ( k ) => el . setAttribute ( k , attrs [ k ] . toString ( ) ) ) ; el . textContent = text ; return el ; } param text param onClick export function createButton ( text , onClick ) { const el = document . createElement ( 'button' ) ; el . className = 'btn btn-sm btn-outline' ; el . textContent = text ; el . onclick = onClick ; return el ; } param text export function createDivElement ( text ) { const el = document . createElement ( 'div' ) ; el . textContent = text ; return el ; }