@dloizides/ui-layout 1.15.1 → 1.16.1

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.
package/dist/index.mjs CHANGED
@@ -82,13 +82,29 @@ var styles2 = StyleSheet.create({
82
82
  fontSize: 16
83
83
  }
84
84
  });
85
- var Heading = ({ text, children }) => {
85
+ var DEFAULT_HEADING_LEVEL = 2;
86
+ var Heading = ({
87
+ text,
88
+ children,
89
+ level = DEFAULT_HEADING_LEVEL,
90
+ style,
91
+ testID
92
+ }) => {
86
93
  const { theme } = useUi();
87
94
  const headingStyle = React8.useMemo(
88
- () => [styles2.heading, { color: theme.colors.text }],
89
- [theme.colors.text]
95
+ () => [styles2.heading, { color: theme.colors.text }, style],
96
+ [theme.colors.text, style]
97
+ );
98
+ return /* @__PURE__ */ jsx(
99
+ Text,
100
+ {
101
+ accessibilityRole: "header",
102
+ "aria-level": level,
103
+ style: headingStyle,
104
+ testID: testID ?? LAYOUT_TEST_IDS.headingText,
105
+ children: text ?? children
106
+ }
90
107
  );
91
- return /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: headingStyle, testID: LAYOUT_TEST_IDS.headingText, children: text ?? children });
92
108
  };
93
109
  var DEFAULT_PADDING_H = 10;
94
110
  var DEFAULT_PADDING_V = 4;