@onehat/ui 0.3.43 → 0.3.44

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.43",
3
+ "version": "0.3.44",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -13,6 +13,7 @@ export default function SquareButton(props) {
13
13
  activeColor,
14
14
  invertColorWhenActive = false,
15
15
  disableInteractions = false,
16
+ fontSize = '20px',
16
17
  ...propsToPass
17
18
  } = props,
18
19
  styles = UiGlobals.styles,
@@ -54,7 +55,7 @@ export default function SquareButton(props) {
54
55
  // _pressed={pressedProps}
55
56
  >
56
57
  <Icon as={icon} color={color} size="xl" />
57
- <Text fontSize={20} color={color}>{text}</Text>
58
+ <Text fontSize={fontSize} color={color}>{text}</Text>
58
59
  </Pressable>;
59
60
  }
60
61
 
@@ -77,6 +77,7 @@ function Form(props) {
77
77
  submitBtnLabel,
78
78
  onSubmit,
79
79
  additionalEditButtons,
80
+ useAdditionalEditButtons = true,
80
81
  additionalFooterButtons,
81
82
 
82
83
  // sizing of outer container
@@ -290,6 +291,9 @@ function Form(props) {
290
291
  editorTypeProps = {};
291
292
 
292
293
  const propertyDef = name && Repository?.getSchema().getPropertyDefinition(name);
294
+ if (!useAdditionalEditButtons) {
295
+ item = _.omit(item, 'additionalEditButtons');
296
+ }
293
297
  if (propertyDef?.isEditingDisabled && checkIsEditingDisabled) {
294
298
  isEditable = false;
295
299
  }
@@ -42,7 +42,7 @@ export default function withPdfButton(WrappedComponent) {
42
42
 
43
43
  } = props,
44
44
  [isModalShown, setIsModalShown] = useState(false),
45
- [width, height] = useAdjustedWindowSize(500, 800);
45
+ [width, height] = useAdjustedWindowSize(500, 800),
46
46
  buildModalItems = () => {
47
47
  const modalItems = _.map(_.cloneDeep(items), (item, ix) => buildNextLayer(item, ix, columnDefaults)); // clone, as we don't want to alter the item by reference
48
48
 
@@ -195,6 +195,7 @@ export default function withPdfButton(WrappedComponent) {
195
195
  setIsModalShown(false);
196
196
  }}
197
197
  submitBtnLabel="View PDF"
198
+ useAdditionalEditButtons={false}
198
199
  />
199
200
  </Column>
200
201
  </Modal>;