@controlkit/headings
Advanced tools
+96
-79
| import { jsx } from 'react/jsx-runtime'; | ||
| import * as stylex from '@stylexjs/stylex'; | ||
| import { forwardRef } from 'react'; | ||
@@ -51,87 +50,105 @@ const styles = stylex.create({ | ||
| }); | ||
| const H1 = forwardRef( | ||
| ({ extend, className, ...props }, ref) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h1", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h1, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| const H1 = ({ | ||
| extend, | ||
| className, | ||
| ref, | ||
| ...props | ||
| }) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h1", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h1, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| }; | ||
| H1.displayName = "H1"; | ||
| const H2 = forwardRef( | ||
| ({ extend, className, ...props }, ref) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h2", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h2, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| const H2 = ({ | ||
| extend, | ||
| className, | ||
| ref, | ||
| ...props | ||
| }) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h2", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h2, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| }; | ||
| H2.displayName = "H2"; | ||
| const H3 = forwardRef( | ||
| ({ extend, className, ...props }, ref) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h3", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h3, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| const H3 = ({ | ||
| extend, | ||
| className, | ||
| ref, | ||
| ...props | ||
| }) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h3", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h3, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| }; | ||
| H3.displayName = "H3"; | ||
| const H4 = forwardRef( | ||
| ({ extend, className, ...props }, ref) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h4", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h4, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| const H4 = ({ | ||
| extend, | ||
| className, | ||
| ref, | ||
| ...props | ||
| }) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h4", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h4, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| }; | ||
| H4.displayName = "H4"; | ||
| const H5 = forwardRef( | ||
| ({ extend, className, ...props }, ref) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h5", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h5, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| const H5 = ({ | ||
| extend, | ||
| className, | ||
| ref, | ||
| ...props | ||
| }) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h5", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h5, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| }; | ||
| H5.displayName = "H5"; | ||
| const H6 = forwardRef( | ||
| ({ extend, className, ...props }, ref) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h6", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h6, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| const H6 = ({ | ||
| extend, | ||
| className, | ||
| ref, | ||
| ...props | ||
| }) => { | ||
| return /* @__PURE__ */ jsx( | ||
| "h6", | ||
| { | ||
| ref, | ||
| className, | ||
| ...stylex.props(styles.base, styles.h6, extend), | ||
| ...props | ||
| } | ||
| ); | ||
| }; | ||
| H6.displayName = "H6"; | ||
| export { H1, H2, H3, H4, H5, H6 }; |
+26
-8
@@ -1,2 +0,2 @@ | ||
| import { HTMLAttributes } from 'react'; | ||
| import { DetailedHTMLProps, HTMLAttributes } from 'react'; | ||
| import * as stylex from "@stylexjs/stylex"; | ||
@@ -6,8 +6,26 @@ type ExtendProps = { | ||
| }; | ||
| declare const H1: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & ExtendProps & import('react').RefAttributes<HTMLHeadingElement>>; | ||
| declare const H2: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & ExtendProps & import('react').RefAttributes<HTMLHeadingElement>>; | ||
| declare const H3: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & ExtendProps & import('react').RefAttributes<HTMLHeadingElement>>; | ||
| declare const H4: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & ExtendProps & import('react').RefAttributes<HTMLHeadingElement>>; | ||
| declare const H5: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & ExtendProps & import('react').RefAttributes<HTMLHeadingElement>>; | ||
| declare const H6: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & ExtendProps & import('react').RefAttributes<HTMLHeadingElement>>; | ||
| export { H1, H2, H3, H4, H5, H6, }; | ||
| declare const H1: { | ||
| ({ extend, className, ref, ...props }: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string; | ||
| }; | ||
| declare const H2: { | ||
| ({ extend, className, ref, ...props }: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string; | ||
| }; | ||
| declare const H3: { | ||
| ({ extend, className, ref, ...props }: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string; | ||
| }; | ||
| declare const H4: { | ||
| ({ extend, className, ref, ...props }: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string; | ||
| }; | ||
| declare const H5: { | ||
| ({ extend, className, ref, ...props }: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string; | ||
| }; | ||
| declare const H6: { | ||
| ({ extend, className, ref, ...props }: DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement> & ExtendProps): import("react/jsx-runtime").JSX.Element; | ||
| displayName: string; | ||
| }; | ||
| export { H1, H2, H3, H4, H5, H6 }; |
+2
-2
| { | ||
| "name": "@controlkit/headings", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "type": "module", | ||
@@ -31,3 +31,3 @@ "module": "dist/index.js", | ||
| "eslint-plugin-react-refresh": "^0.4.7", | ||
| "typescript": "^5.2.2", | ||
| "typescript": "5.7.3", | ||
| "vite": "6.2.0", | ||
@@ -34,0 +34,0 @@ "vite-plugin-dts": "^3.9.1" |
6454
2.66%181
23.97%