@dfx.swiss/react-components 1.3.0-beta.16 → 1.3.0-beta.18

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/README.md CHANGED
@@ -1,3 +1,17 @@
1
1
  # React Components
2
2
 
3
3
  React UI components for DFX.swiss
4
+
5
+ ## Testing package modifications using `npm link`
6
+
7
+ To test the components in a project, you can use `npm link` to link the local package to the project.
8
+
9
+ 1. To avoid conflicts with the package name, you can change the package name in the `package.json` file, e.g. to 'react-components-local'
10
+ 2. Build the packages using `npm run build` in the root directory.
11
+ 3. Link the package using `npm link` in the package directory, i.e. `cd packages/react-components && npm link`.
12
+ 4. In the project where you want to test the package, link the package using `npm link <package-name>`, i.e. `npm link react-components-local`.
13
+ 5. Import the component in the project using the package name, e.g. `import { StyledTabContentWrapper } from 'react-components-local'`.
14
+ 6. To unlink the package, use `npm unlink <package-name>`.
15
+
16
+ Note that at any time you can view linked packages using `npm ls --global --depth=0 --link=true`.
17
+ When you're done, remember to revert the package name in the `package.json` file.
@@ -3,6 +3,7 @@ export interface StyledTabContentWrapperProps extends PropsWithChildren {
3
3
  showBackArrow?: boolean;
4
4
  leftBorder?: boolean;
5
5
  onBackClick?: () => void;
6
+ className?: string;
6
7
  }
7
- export default function StyledTabContentWrapper({ showBackArrow, leftBorder, children, onBackClick, }: StyledTabContentWrapperProps): import("react/jsx-runtime").JSX.Element;
8
+ export default function StyledTabContentWrapper({ showBackArrow, leftBorder, children, onBackClick, className, }: StyledTabContentWrapperProps): import("react/jsx-runtime").JSX.Element;
8
9
  //# sourceMappingURL=StyledTabContentWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StyledTabContentWrapper.d.ts","sourceRoot":"","sources":["../../src/stories/StyledTabContentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,aAAqB,EACrB,UAAkB,EAClB,QAAQ,EACR,WAAW,GACZ,EAAE,4BAA4B,2CAW9B"}
1
+ {"version":3,"file":"StyledTabContentWrapper.d.ts","sourceRoot":"","sources":["../../src/stories/StyledTabContentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,aAAqB,EACrB,UAAkB,EAClB,QAAQ,EACR,WAAW,EACX,SAAc,GACf,EAAE,4BAA4B,2CAW9B"}
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { IconVariant } from './DfxIcon';
14
14
  import StyledIconButton from './StyledIconButton';
15
15
  export default function StyledTabContentWrapper(_a) {
16
- var _b = _a.showBackArrow, showBackArrow = _b === void 0 ? false : _b, _c = _a.leftBorder, leftBorder = _c === void 0 ? false : _c, children = _a.children, onBackClick = _a.onBackClick;
17
- return (_jsxs("div", __assign({ className: "w-full ".concat(leftBorder ? 'border-l border-dfxGray-400' : '') }, { children: [showBackArrow && onBackClick && (_jsx("div", __assign({ className: "absolute" }, { children: _jsx(StyledIconButton, { icon: IconVariant.BACK, onClick: onBackClick }) }))), _jsx("div", __assign({ className: "m-auto max-w-lg" }, { children: children }))] })));
16
+ var _b = _a.showBackArrow, showBackArrow = _b === void 0 ? false : _b, _c = _a.leftBorder, leftBorder = _c === void 0 ? false : _c, children = _a.children, onBackClick = _a.onBackClick, _d = _a.className, className = _d === void 0 ? '' : _d;
17
+ return (_jsxs("div", __assign({ className: "w-full ".concat(leftBorder ? 'border-l border-dfxGray-400' : '') }, { children: [showBackArrow && onBackClick && (_jsx("div", __assign({ className: "absolute" }, { children: _jsx(StyledIconButton, { icon: IconVariant.BACK, onClick: onBackClick }) }))), _jsx("div", __assign({ className: "m-auto max-w-lg ".concat(className) }, { children: children }))] })));
18
18
  }
19
19
  //# sourceMappingURL=StyledTabContentWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StyledTabContentWrapper.js","sourceRoot":"","sources":["../../src/stories/StyledTabContentWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAQlD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAKjB;QAJ7B,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA,EACrB,kBAAkB,EAAlB,UAAU,mBAAG,KAAK,KAAA,EAClB,QAAQ,cAAA,EACR,WAAW,iBAAA;IAEX,OAAO,CACL,wBAAK,SAAS,EAAE,iBAAU,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAE,iBACxE,aAAa,IAAI,WAAW,IAAI,CAC/B,uBAAK,SAAS,EAAC,UAAU,gBACvB,KAAC,gBAAgB,IAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,GAAI,IAC9D,CACP,EACD,uBAAK,SAAS,EAAC,iBAAiB,gBAAE,QAAQ,IAAO,KAC7C,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"StyledTabContentWrapper.js","sourceRoot":"","sources":["../../src/stories/StyledTabContentWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AASlD,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAMjB;QAL7B,qBAAqB,EAArB,aAAa,mBAAG,KAAK,KAAA,EACrB,kBAAkB,EAAlB,UAAU,mBAAG,KAAK,KAAA,EAClB,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA;IAEd,OAAO,CACL,wBAAK,SAAS,EAAE,iBAAU,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,CAAE,iBACxE,aAAa,IAAI,WAAW,IAAI,CAC/B,uBAAK,SAAS,EAAC,UAAU,gBACvB,KAAC,gBAAgB,IAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,GAAI,IAC9D,CACP,EACD,uBAAK,SAAS,EAAE,0BAAmB,SAAS,CAAE,gBAAG,QAAQ,IAAO,KAC5D,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@dfx.swiss/react-components",
4
- "version": "1.3.0-beta.16",
4
+ "version": "1.3.0-beta.18",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -88,5 +88,5 @@
88
88
  "tailwindcss": "^3.2.4",
89
89
  "webpack": "^5.75.0"
90
90
  },
91
- "gitHead": "27fdbaa5fe5ce7b8bf2d9173dbf90d604dd08e53"
91
+ "gitHead": "647098f2e6d84e2e88bf2be7efdc57d056f7aeea"
92
92
  }