Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as PropTypes from 'prop-types';
import createComponent from '../../createComponent';
import HIGElement from '../../../elements/HIGElement';
import * as HIG from 'hig-vanilla';
const HIGSectionCollapse = HIG.GlobalNav._partials.SideNav._partials.Section._partials.Collapse;
export class SectionCollapseAdapter extends HIGElement {
constructor(props) {
super(HIGSectionCollapse, props);
}
componentDidMount() {
this.commitUpdate(['minimized', this.initialProps.minimized]);
}
commitUpdate(updatePayload, oldProps, newProp) {
for (let i = 0; i < updatePayload.length; i += 2) {
const propKey = updatePayload[i];
const propValue = updatePayload[i + 1];
switch (propKey) {
import * as PropTypes from 'prop-types';
import createComponent from '../../createComponent';
import HIGElement from '../../../elements/HIGElement';
import * as HIG from 'hig-vanilla';
const HIGModuleCollapse = HIG.GlobalNav._partials.SideNav._partials.Section._partials.Group._partials.Module._partials.Collapse;
export class ModuleCollapseAdapter extends HIGElement {
constructor(props) {
super(HIGModuleCollapse, props);
}
componentDidMount() {
if (this.props.minimized) {
this.commitUpdate(['minimized', this.props.minimized]);
}
if (this.props.onClick) {
this.commitUpdate(['onClick', this.props.onClick]);
}
}
commitUpdate(updatePayload, oldProps, newProp) {
constructor(initialProps) {
super(HIG.GlobalNav, initialProps);
}