@camunda/camunda-composite-components 0.0.22 → 0.0.23-rc1
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,12 +1,12 @@
|
|
|
1
1
|
# Camunda Composite Components
|
|
2
2
|
|
|
3
|
-
Storybook: [Link](https://
|
|
3
|
+
Storybook: [Link](https://camunda-composite-components.pages.dev/)
|
|
4
4
|
|
|
5
5
|
## Dev
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# install
|
|
9
|
-
|
|
9
|
+
yarn
|
|
10
10
|
|
|
11
11
|
# start storybook
|
|
12
12
|
yarn storybook
|
|
@@ -19,7 +19,7 @@ yarn build
|
|
|
19
19
|
|
|
20
20
|
Bump version in `package.json` and create a [new release](https://github.com/camunda-cloud/camunda-composite-components/releases/new). This will start a github action to publish the package to the github package repository.
|
|
21
21
|
|
|
22
|
-
Pushing to `main` will update the storybook available under [
|
|
22
|
+
Pushing to `main` will update the storybook available under [cloudflare page](https://camunda-composite-components.pages.dev/).
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
@@ -173,16 +173,18 @@ const C3NavigationSideBar = (props) => {
|
|
|
173
173
|
sideBar.customElements &&
|
|
174
174
|
!sideBar.customElements?.activeOrganization && (React.createElement(SwitcherDivider, null)),
|
|
175
175
|
sideBar.elements &&
|
|
176
|
-
sideBar.elements.map((element, index) => (React.createElement(
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
element.onClick()
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
176
|
+
sideBar.elements.map((element, index) => (React.createElement("span", { key: element.key },
|
|
177
|
+
element.preceedingDivider && React.createElement(SwitcherDivider, null),
|
|
178
|
+
React.createElement(Button, { style: index === 0 && !sideBar.customElements
|
|
179
|
+
? { marginTop: "1.5rem", whiteSpace: "nowrap" }
|
|
180
|
+
: { whiteSpace: "nowrap" }, size: "sm", kind: element.kind ?? "ghost", className: "cds--switcher__item", onClick: () => {
|
|
181
|
+
if (element.onClick) {
|
|
182
|
+
element.onClick();
|
|
183
|
+
}
|
|
184
|
+
if (sideBar.closeOnClick !== false) {
|
|
185
|
+
setSideBarOpen(false);
|
|
186
|
+
}
|
|
187
|
+
}, tabIndex: itemTabIndex }, element.label)))),
|
|
186
188
|
sideBar.type === "info" && sideBar.version !== undefined && (React.createElement(React.Fragment, null,
|
|
187
189
|
React.createElement(SwitcherDivider, null),
|
|
188
190
|
React.createElement("span", { className: "cds--switcher__item", style: {
|
|
@@ -18,6 +18,7 @@ export interface C3NavigationElementProps {
|
|
|
18
18
|
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
19
19
|
onClick?: () => void;
|
|
20
20
|
subElements?: C3NavigationElementProps[];
|
|
21
|
+
preceedingDivider?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export interface C3NavigationSideBarBaseProps {
|
|
23
24
|
ariaLabel?: string;
|