feat: migrate Pagination Header and InputOTP with field and event regressions
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, h, useAttrs } from "vue";
|
||||
import { headerVariants } from "@heroui-vue/styles";
|
||||
|
||||
/**
|
||||
* Collection / group section heading (RAC Header).
|
||||
* Not an application top bar with logo or navigation.
|
||||
* Renders a native `<header>` by default — matching the fixed RAC contract.
|
||||
*/
|
||||
export default defineComponent({
|
||||
name: "HeaderRoot",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
/** Render the root as a custom element instead of `header`. */
|
||||
as: {
|
||||
type: String,
|
||||
default: "header",
|
||||
},
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
const attrs = useAttrs();
|
||||
|
||||
function render() {
|
||||
return h(
|
||||
props.as,
|
||||
{
|
||||
...attrs,
|
||||
class: [headerVariants(), attrs.class],
|
||||
"data-slot": "header",
|
||||
},
|
||||
slots.default?.(),
|
||||
);
|
||||
}
|
||||
|
||||
return render;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user