@onehat/ui 0.3.54 → 0.3.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.54",
3
+ "version": "0.3.55",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -27,8 +27,7 @@ export default function Header(props) {
27
27
  const {
28
28
  testID = 'Header',
29
29
  title = '',
30
- isClosable = true,
31
- onClose = emptyFn,
30
+ onClose,
32
31
  isCollapsible = true,
33
32
  collapseDirection = VERTICAL,
34
33
  isCollapsed = false,
@@ -38,13 +37,15 @@ export default function Header(props) {
38
37
 
39
38
  let closeBtn = null,
40
39
  collapseBtn = null;
41
- if (isClosable) {
40
+ if (onClose) {
42
41
  closeBtn = <IconButton
43
42
  icon={<Icon as={Xmark} size={styles.PANEL_HEADER_ICON_SIZE} color={styles.PANEL_HEADER_ICON_COLOR} />}
44
43
  onPress={onClose}
45
44
  testID="closeBtn"
46
45
  alignSelf="center"
47
- mr={1}
46
+ mr={3}
47
+ borderWidth={1}
48
+ borderColor="trueGray.400"
48
49
  />;
49
50
  }
50
51
  if (isCollapsible) {
@@ -38,8 +38,7 @@ function Panel(props) {
38
38
  title = props.model ? UiGlobals.customInflect(Inflector.camel2words(Inflector.underscore(props.model))) : '',
39
39
  showHeader = true,
40
40
  header = null,
41
- isClosable = false,
42
- onClose = emptyFn,
41
+ onClose,
43
42
  isCollapsible = true,
44
43
  isCollapsed = false,
45
44
  setIsCollapsed,
@@ -87,7 +86,6 @@ function Panel(props) {
87
86
  if (showHeader && title) {
88
87
  headerComponent = <Header
89
88
  title={title + titleSuffix}
90
- isClosable={isClosable}
91
89
  onClose={onClose}
92
90
  isCollapsible={isCollapsible}
93
91
  isCollapsed={isCollapsed}