@plasmicpkgs/plasmic-cms 0.0.39 → 0.0.45

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.
@@ -51,9 +51,11 @@ interface CmsRowLinkProps extends CanvasComponentProps<TableContextData> {
51
51
  field: string;
52
52
  hrefProp: string;
53
53
  children: React.ReactNode;
54
+ prefix?: string;
55
+ suffix?: string;
54
56
  }
55
57
  export declare const cmsRowLinkMeta: ComponentMeta<CmsRowLinkProps>;
56
- export declare function CmsRowLink({ table, field, hrefProp, children, setControlContextData, }: CmsRowLinkProps): React.ReactElement | null;
58
+ export declare function CmsRowLink({ table, field, hrefProp, children, setControlContextData, prefix, suffix, }: CmsRowLinkProps): React.ReactElement | null;
57
59
  interface CmsRowImageProps extends CanvasComponentProps<TableContextData> {
58
60
  table: string;
59
61
  field: string;
@@ -2098,6 +2098,16 @@ var cmsRowLinkMeta = {
2098
2098
  displayName: '"href" prop',
2099
2099
  description: "Prop to inject into children",
2100
2100
  defaultValue: "href"
2101
+ },
2102
+ prefix: {
2103
+ type: "string",
2104
+ displayName: "Optional prefix",
2105
+ description: "Prefix to prepend to prop value."
2106
+ },
2107
+ suffix: {
2108
+ type: "string",
2109
+ displayName: "Optional suffix",
2110
+ description: "Suffix to append to prop value."
2101
2111
  }
2102
2112
  }
2103
2113
  };
@@ -2108,7 +2118,9 @@ function CmsRowLink(_ref15) {
2108
2118
  field = _ref15.field,
2109
2119
  hrefProp = _ref15.hrefProp,
2110
2120
  children = _ref15.children,
2111
- setControlContextData = _ref15.setControlContextData;
2121
+ setControlContextData = _ref15.setControlContextData,
2122
+ prefix = _ref15.prefix,
2123
+ suffix = _ref15.suffix;
2112
2124
  var tables = useTables();
2113
2125
  var res = useRow(table);
2114
2126
 
@@ -2144,7 +2156,7 @@ function CmsRowLink(_ref15) {
2144
2156
  if (React.isValidElement(child)) {
2145
2157
  var _React$cloneElement;
2146
2158
 
2147
- return React.cloneElement(child, (_React$cloneElement = {}, _React$cloneElement[hrefProp] = value, _React$cloneElement));
2159
+ return React.cloneElement(child, (_React$cloneElement = {}, _React$cloneElement[hrefProp] = prefix || suffix ? "" + (prefix || "") + value + (suffix || "") : value, _React$cloneElement));
2148
2160
  }
2149
2161
 
2150
2162
  return child;