()
| 13 | |
| 14 | export class Toolbar extends BaseComponent<ToolbarProps> { |
| 15 | render() { |
| 16 | let { props } = this |
| 17 | let options = this.context.options |
| 18 | let { sectionWidgets } = props.model |
| 19 | |
| 20 | const { borderlessX, borderlessTop, borderlessBottom } = computeViewBorderless(options) |
| 21 | const toolbarClassOption = props.isHeader ? options.headerToolbarClass : options.footerToolbarClass |
| 22 | |
| 23 | return ( |
| 24 | <div |
| 25 | className={joinClassNames( |
| 26 | generateClassName(toolbarClassOption, { borderlessX, borderlessTop, borderlessBottom }), |
| 27 | generateClassName(options.toolbarClass, { borderlessX, borderlessTop, borderlessBottom }), |
| 28 | )} |
| 29 | > |
| 30 | {this.renderSection('start', sectionWidgets.start)} |
| 31 | {this.renderSection('center', sectionWidgets.center)} |
| 32 | {this.renderSection('end', sectionWidgets.end)} |
| 33 | </div> |
| 34 | ) |
| 35 | } |
| 36 | |
| 37 | renderSection(name: string, widgetGroups: ToolbarWidget[][]) { |
| 38 | let { props } = this |
nothing calls this directly
no test coverage detected