__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import { createElement, Fragment, Component } from '@wordpress/element'
import OptionsPanel from '../OptionsPanel'
import classnames from 'classnames'
import { normalizeCondition, matchValuesWithCondition } from 'match-conditions'
export default class Tabs extends Component {
state = {
currentTab: 0,
}
render() {
const filteredTabs = this.props.renderingChunk.filter(
(singleTab) =>
!singleTab.condition ||
matchValuesWithCondition(
normalizeCondition(singleTab.condition),
this.props.value
)
)
const currentTab = filteredTabs[this.state.currentTab]
return (
<div className="ct-tabs">
<ul>
{filteredTabs
.map((singleTab, index) => ({ singleTab, index }))
.map(({ singleTab, index }) => (
<li
key={singleTab.id}
onClick={() =>
this.setState({ currentTab: index })
}
className={classnames({
active: index === this.state.currentTab,
})}>
{singleTab.title
? singleTab.title
: singleTab.id}
</li>
))}
</ul>
<div className="ct-current-tab">
<OptionsPanel
purpose={this.props.purpose}
key={currentTab.id}
onChange={(key, val) => this.props.onChange(key, val)}
onChangeMultiple={this.props.onChangeMultiple}
options={currentTab.options}
value={this.props.value}
/>
</div>
</div>
)
}
}
/*
const Condition = ({ renderingChunk, value, onChange }) =>
renderingChunk.map(
conditionOption =>
matchValuesWithCondition(
normalizeCondition(conditionOption.condition),
value
) ? (
<OptionsPanel
key={conditionOption.id}
onChange={val => onChange({ ...value, ...val })}
options={conditionOption.options}
value={value}
/>
) : (
[]
)
)
export default Condition
*/
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Accordion.js | File | 1.76 KB | 0640 |
|
| Condition.js | File | 5.72 KB | 0640 |
|
| Group.js | File | 2.81 KB | 0640 |
|
| LabeledGroup.js | File | 4.35 KB | 0640 |
|
| MigrateValues.js | File | 2.26 KB | 0640 |
|
| Tabs.js | File | 1.8 KB | 0640 |
|
| ct-has-meta-category-button.js | File | 1.17 KB | 0640 |
|
| use-force-update.js | File | 325 B | 0640 |
|