@q2devel/q2-storybook 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ type HeadingProps = {
3
+ level: 1 | 2 | 3 | 4 | 5 | 6;
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ id?: string;
7
+ };
8
+ export default function Heading({ level, children, className, id }: HeadingProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { buildClassesByJoining } from "@/utils/StylingHelper";
3
+ export default function Heading({ level = 1, children, className, id }) {
4
+ const Tag = `h${level}`;
5
+ const baseStyles = {
6
+ 1: "text-4xl font-bold mt-12 mb-8 text-lime-900",
7
+ 2: "text-3xl font-semibold text-gray-900",
8
+ 3: "text-2xl font-semibold text-gray-900",
9
+ 4: "text-xl font-medium text-gray-900",
10
+ 5: "text-lg font-medium text-gray-900",
11
+ 6: "text-base font-medium text-gray-900",
12
+ };
13
+ return (_jsx(Tag, { id: id, className: buildClassesByJoining(baseStyles[level], className), children: children }));
14
+ }
@@ -3,15 +3,15 @@ import { forwardRef } from 'react';
3
3
  const Tooltip = forwardRef(({ content, children, backgroundColor = 'bg-black', textColor = 'text-white', placement = 'bottom', contentClassName = '', disabled = false, lazy = true, }, ref) => {
4
4
  if (disabled)
5
5
  return _jsx(_Fragment, { children: children });
6
- return (_jsxs("span", { className: "relative group cursor-pointer", children: [children, content && (_jsx("span", { className: `absolute z-10 hidden group-hover:block
6
+ return (_jsxs("span", { className: "relative group cursor-pointer", children: [children, content && (_jsx("span", { className: `absolute z-10 hidden group-hover:block
7
7
  ${placement === 'top'
8
8
  ? 'bottom-full mb-2'
9
9
  : placement === 'bottom'
10
10
  ? 'top-full mt-2'
11
11
  : placement === 'left'
12
12
  ? 'right-full mr-2'
13
- : 'left-full ml-2'}
14
- left-1/2 -translate-x-1/2 px-3 py-2 rounded ${backgroundColor} ${textColor}
13
+ : 'left-full ml-2'}
14
+ left-1/2 -translate-x-1/2 px-3 py-2 rounded ${backgroundColor} ${textColor}
15
15
  text-xs whitespace-pre-wrap ${contentClassName}`, children: content }))] }));
16
16
  });
17
17
  Tooltip.displayName = 'Tooltip';