Skip to content

Commit 468a1a6

Browse files
openshift-cherrypick-robotGitHub Actions
andauthored
proc-configuring-floating-action-button-as-a-dynamic-plugin.adoc (#1181)
Co-authored-by: GitHub Actions <[email protected]>
1 parent 112248b commit 468a1a6

File tree

3 files changed

+94
-90
lines changed

3 files changed

+94
-90
lines changed

assemblies/assembly-configuring-a-floating-action-button.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55

66
You can use the floating action button plugin to configure any action as a floating button in the {product-short} instance. The floating action button plugin is enabled by default. You can also configure floating action buttons to display as submenu options within the main floating action button by assigning the floating action buttons to the same `slot` field of your `dynamic-plugins.yaml` file.
77

8-
include::modules/configuring-a-floating-action-button/proc-configuring-floating-action-button-as-a-dynamic-plugin.adoc[leveloffset=+1]
8+
include::modules/configuring-a-floating-action-button/proc-configuring-floating-action-button-as-a-dynamic-plugin.adoc[leveloffset=+1]
9+
10+
include::modules/configuring-a-floating-action-button/ref-floating-action-button-parameters.adoc[leveloffset=+1]

modules/configuring-a-floating-action-button/proc-configuring-floating-action-button-as-a-dynamic-plugin.adoc

Lines changed: 3 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ You must have sufficient permissions as a platform engineer.
1111

1212
To configure a floating action button as a dynamic plugin, complete any of the following tasks:
1313

14-
* Specify the `global.floatingactionbutton/config` mount point in your `app-config-dynamic.yaml` file. For example:
14+
* Specify the `global.floatingactionbutton/config` mount point in your `app-config-dynamic.yaml` file. For example:
1515
+
1616
.Example of a bulk-import plugin as a floating action button
1717
[source,yaml]
1818
----
1919
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-bulk-import
2020
disabled: false
21-
pluginConfig:
21+
pluginConfig:
2222
dynamicPlugins:
2323
frontend:
2424
red-hat-developer-hub.backstage-plugin-bulk-import:
@@ -206,90 +206,4 @@ To configure a floating action button as a dynamic plugin, complete any of the f
206206
icon: bulkImportIcon
207207
text: Bulk import
208208
----
209-
<1> (Required) The import name with an associated component to the mount point.
210-
211-
== Floating action button parameters
212-
Use the parameters as shown in the following table to configure your floating action button plugin.
213-
214-
.Floating action button parameters
215-
|===
216-
| Name | Description | Type | Default value | Required
217-
218-
| `slot`
219-
| Position of the floating action button. Valid values: `PAGE_END`, `BOTTOM_LEFT`
220-
| `enum`
221-
| `PAGE_END`
222-
| No
223-
224-
| `label`
225-
| Name of the floating action button
226-
| `String`
227-
| Not applicable
228-
| Yes
229-
230-
| `icon`
231-
| Icon of the floating action button. Recommended to use filled icons from the link:https://fonts.google.com/icons[Material Design library]. You can also use an svg icon. For example: `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#e8eaed"><g><rect fill="none" height="24" width="24"/></g><g><path d="M11,7L9.6,8.4l2.6,2.6H2v2h10.2l-2.6,2.6L11,17l5-5L11,7z M20,19h-8v2h8c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-8v2h8V19z"/></g></svg>`
232-
| `String`, `React.ReactElement`, `SVG image icon`, `HTML image icon`
233-
| Not applicable
234-
| No
235-
236-
| `showLabel`
237-
| Display of the label next to your icon
238-
| `Boolean`
239-
| Not applicable
240-
| No
241-
242-
| `size`
243-
| Size of the floating action button
244-
| `small`, `medium`, `large`
245-
| `medium`
246-
| No
247-
248-
| `color`
249-
| Color of the component. It supports both default and custom theme colors, that are added from the link:https://mui.com/material-ui/customization/palette/#custom-colors[Palette Getting started guide].
250-
| `default`, `error`, `info`, `inherit`, `primary`, `secondary`, `success`, `warning`
251-
| `default`
252-
| No
253-
254-
| `onClick`
255-
| Performed action when selecting a floating action button
256-
| `React.MouseEventHandler`
257-
| Not applicable
258-
| No
259-
260-
| `to`
261-
| Link that opens when selecting a floating action button
262-
| `String`
263-
| Not applicable
264-
| No
265-
266-
| `toolTip`
267-
| Text that appears when hovering over a floating action button
268-
| `String`
269-
| Not applicable
270-
| No
271-
272-
| `priority`
273-
| Order of the floating action buttons displayed in the submenu. A larger value means higher priority.
274-
| `number`
275-
| Not applicable
276-
| No
277-
278-
| `visibleOnPaths`
279-
| Display floating action button on the specified paths
280-
| `string[]`
281-
| Display floating action button on all paths
282-
| No
283-
284-
| `excludeOnPaths`
285-
| Hide floating action button on the specified paths
286-
| `string[]`
287-
| Display floating action button on all paths
288-
| No
289-
290-
|===
291-
292-
[NOTE]
293-
====
294-
If multiple floating button actions are assigned to the same `slot` value, the floating buttons are displayed as submenu options within the main floating action button.
295-
====
209+
<1> (Required) The import name with an associated component to the mount point.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="ref-floating-action-button-parameters_{context}"]
3+
= Floating action button parameters
4+
5+
Use the parameters as shown in the following table to configure your floating action button plugin.
6+
7+
.Floating action button parameters
8+
|===
9+
| Name | Description | Type | Default value | Required
10+
11+
| `slot`
12+
| Position of the floating action button. Valid values: `PAGE_END`, `BOTTOM_LEFT`
13+
| `enum`
14+
| `PAGE_END`
15+
| No
16+
17+
| `label`
18+
| Name of the floating action button
19+
| `String`
20+
| Not applicable
21+
| Yes
22+
23+
| `icon`
24+
| Icon of the floating action button. Recommended to use filled icons from the link:https://fonts.google.com/icons[Material Design library]. You can also use an svg icon. For example: `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#e8eaed"><g><rect fill="none" height="24" width="24"/></g><g><path d="M11,7L9.6,8.4l2.6,2.6H2v2h10.2l-2.6,2.6L11,17l5-5L11,7z M20,19h-8v2h8c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-8v2h8V19z"/></g></svg>`
25+
| `String`, `React.ReactElement`, `SVG image icon`, `HTML image icon`
26+
| Not applicable
27+
| No
28+
29+
| `showLabel`
30+
| Display of the label next to your icon
31+
| `Boolean`
32+
| Not applicable
33+
| No
34+
35+
| `size`
36+
| Size of the floating action button
37+
| `small`, `medium`, `large`
38+
| `medium`
39+
| No
40+
41+
| `color`
42+
| Color of the component. It supports both default and custom theme colors, that are added from the link:https://mui.com/material-ui/customization/palette/#custom-colors[Palette Getting started guide].
43+
| `default`, `error`, `info`, `inherit`, `primary`, `secondary`, `success`, `warning`
44+
| `default`
45+
| No
46+
47+
| `onClick`
48+
| Performed action when selecting a floating action button
49+
| `React.MouseEventHandler`
50+
| Not applicable
51+
| No
52+
53+
| `to`
54+
| Link that opens when selecting a floating action button
55+
| `String`
56+
| Not applicable
57+
| No
58+
59+
| `toolTip`
60+
| Text that appears when hovering over a floating action button
61+
| `String`
62+
| Not applicable
63+
| No
64+
65+
| `priority`
66+
| Order of the floating action buttons displayed in the submenu. A larger value means higher priority.
67+
| `number`
68+
| Not applicable
69+
| No
70+
71+
| `visibleOnPaths`
72+
| Display floating action button on the specified paths
73+
| `string[]`
74+
| Display floating action button on all paths
75+
| No
76+
77+
| `excludeOnPaths`
78+
| Hide floating action button on the specified paths
79+
| `string[]`
80+
| Display floating action button on all paths
81+
| No
82+
83+
|===
84+
85+
[NOTE]
86+
====
87+
If multiple floating button actions are assigned to the same `slot` value, the floating buttons are displayed as submenu options within the main floating action button.
88+
====

0 commit comments

Comments
 (0)