v1.1.0: pooled runtime, 959 tests, production hardening (0 squash)
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Imhotep Property Enumerated Fixture</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
padding: 24px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-sm {
|
||||
min-width: 60px;
|
||||
min-height: 32px;
|
||||
padding: 4px 12px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.btn-md {
|
||||
min-width: 80px;
|
||||
min-height: 40px;
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.btn-lg {
|
||||
min-width: 100px;
|
||||
min-height: 48px;
|
||||
padding: 12px 24px;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="target-button" class="btn btn-md" data-testid="enumerated-button">
|
||||
Button
|
||||
</button>
|
||||
|
||||
<script>
|
||||
// Apply props from window.__IMHOTEP_PROPS__
|
||||
function applyProps(props) {
|
||||
const btn = document.getElementById('target-button');
|
||||
if (!btn || !props) return;
|
||||
|
||||
if (props.size) {
|
||||
btn.className = 'btn btn-' + props.size;
|
||||
}
|
||||
if (props.label) {
|
||||
btn.textContent = props.label;
|
||||
}
|
||||
if (props.disabled !== undefined) {
|
||||
btn.disabled = props.disabled;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply initial props
|
||||
applyProps(window.__IMHOTEP_PROPS__);
|
||||
|
||||
// Listen for prop updates from test harness
|
||||
window.addEventListener('imhotep:update-props', function(event) {
|
||||
if (event.detail && event.detail.props) {
|
||||
applyProps(event.detail.props);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user