MCPcopy Create free account
hub / github.com/ampproject/amphtml / PanelSelectorButton

Function PanelSelectorButton

build-system/server/app-index/settings.js:35–49  ·  view source on GitHub ↗
({expression, type, value})

Source from the content-addressed store, hash-verified

33const panelKey = ampStateKey(stateId, panelStateKey);
34
35const PanelSelectorButton = ({expression, type, value}) => html`
36 <button
37 class="settings-panel-button"
38 [class]="'settings-panel-button' + (${panelKey} != '${type}' ? '' : ' open')"
39 data-type="${type}"
40 tabindex="0"
41 on="tap: AMP.setState({
42 ${stateId}: {
43 ${panelStateKey}: (${panelKey} != '${type}' ? '${type}' : null),
44 }
45 })"
46 >
47 <span>${type}</span> <strong [text]="${expression}">${value}</strong>
48 </button>
49`;
50
51/**
52 * @param {{

Callers 1

SettingsPanelButtonsFunction · 0.85

Calls 1

htmlFunction · 0.70

Tested by

no test coverage detected