playbook_ui_docs 14.14.0.pre.rc.5 → 14.15.0.pre.rc.0
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +75 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display.html.erb +22 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display.jsx +34 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display_rails.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display_react.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_currency/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.jsx +17 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.jsx +61 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98cc90b2f2b232bb49ec4d1c5177a2f39709a61972b6ed31e0365218a09099d8
|
4
|
+
data.tar.gz: 22b24a4a07bde67f30ae08d8b74272c3c7ccecb3304f8d8e8c99678921519d19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d90c15461631759653dd52c506ee5a08a5b8aa7f0657a7582993f3f8ae9767859bfa9d2fbd2057e3a99c782dfbd2be04faddd60b1a55fb334fd47aa480ca4780
|
7
|
+
data.tar.gz: 04e52b1c799a197b9762fa9b496680aa3111b60460bf2c40450fe0ded657ebd5700201ddd7761837240d87c1b3e2ea0d7c46ff6bef893aa6fe46c9dbef50da9e
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import { AdvancedTable, Pill } from "playbook-ui"
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
+
|
5
|
+
const AdvancedTableColumnHeadersCustomCell = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
label: "Enrollment Data",
|
14
|
+
columns: [
|
15
|
+
{
|
16
|
+
accessor: "newEnrollments",
|
17
|
+
label: "New Enrollments",
|
18
|
+
customRenderer: (row, value) => (
|
19
|
+
<Pill text={value}
|
20
|
+
variant="success"
|
21
|
+
/>
|
22
|
+
),
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "scheduledMeetings",
|
26
|
+
label: "Scheduled Meetings",
|
27
|
+
customRenderer: (row, value) => (
|
28
|
+
<Pill text={value}
|
29
|
+
variant="info"
|
30
|
+
/>
|
31
|
+
),
|
32
|
+
},
|
33
|
+
],
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: "Performance Data",
|
37
|
+
columns: [
|
38
|
+
{
|
39
|
+
accessor: "attendanceRate",
|
40
|
+
label: "Attendance Rate",
|
41
|
+
},
|
42
|
+
{
|
43
|
+
accessor: "completedClasses",
|
44
|
+
label: "Completed Classes",
|
45
|
+
customRenderer: (row, value) => (
|
46
|
+
<Pill text={value}
|
47
|
+
variant="error"
|
48
|
+
/>
|
49
|
+
),
|
50
|
+
},
|
51
|
+
{
|
52
|
+
accessor: "classCompletionRate",
|
53
|
+
label: "Class Completion Rate",
|
54
|
+
},
|
55
|
+
{
|
56
|
+
accessor: "graduatedStudents",
|
57
|
+
label: "Graduated Students",
|
58
|
+
},
|
59
|
+
],
|
60
|
+
},
|
61
|
+
];
|
62
|
+
|
63
|
+
|
64
|
+
return (
|
65
|
+
<>
|
66
|
+
<AdvancedTable
|
67
|
+
columnDefinitions={columnDefinitions}
|
68
|
+
tableData={MOCK_DATA}
|
69
|
+
{...props}
|
70
|
+
/>
|
71
|
+
</>
|
72
|
+
)
|
73
|
+
}
|
74
|
+
|
75
|
+
export default AdvancedTableColumnHeadersCustomCell
|
@@ -30,4 +30,4 @@
|
|
30
30
|
}
|
31
31
|
] %>
|
32
32
|
|
33
|
-
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, sticky: true }}) %>
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { container: false, sticky: true }}) %>
|
@@ -1 +1,3 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
|
2
|
+
|
3
|
+
This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#table-props-sticky-header) doc example below.
|
@@ -1,3 +1,3 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
|
2
2
|
|
3
3
|
This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
accessor: "newEnrollments",
|
9
|
+
label: "New Enrollments",
|
10
|
+
},
|
11
|
+
{
|
12
|
+
accessor: "scheduledMeetings",
|
13
|
+
label: "Scheduled Meetings",
|
14
|
+
},
|
15
|
+
{
|
16
|
+
accessor: "attendanceRate",
|
17
|
+
label: "Attendance Rate",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
accessor: "completedClasses",
|
21
|
+
label: "Completed Classes",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
accessor: "classCompletionRate",
|
25
|
+
label: "Class Completion Rate",
|
26
|
+
},
|
27
|
+
{
|
28
|
+
accessor: "graduatedStudents",
|
29
|
+
label: "Graduated Students",
|
30
|
+
}
|
31
|
+
] %>
|
32
|
+
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, max_height: "xs", table_props: { sticky: true }}) %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
2
|
+
|
3
|
+
A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table#table-props) doc example above.
|
@@ -5,6 +5,7 @@ examples:
|
|
5
5
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
6
6
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
7
7
|
- advanced_table_table_props: Table Props
|
8
|
+
- advanced_table_table_props_sticky_header: Table Props Sticky Header
|
8
9
|
- advanced_table_beta_sort: Enable Sorting
|
9
10
|
- advanced_table_responsive: Responsive Tables
|
10
11
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
@@ -30,6 +31,7 @@ examples:
|
|
30
31
|
- advanced_table_pagination_with_props: Pagination Props
|
31
32
|
- advanced_table_column_headers: Multi-Header Columns
|
32
33
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
34
|
+
- advanced_table_column_headers_custom_cell: Multi-Header Columns with Custom Cells
|
33
35
|
# - advanced_table_no_subrows: Table with No Subrows
|
34
36
|
- advanced_table_selectable_rows: Selectable Rows
|
35
37
|
- advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
@@ -19,4 +19,5 @@ export { default as AdvancedTableSelectableRowsNoSubrows } from './_advanced_tab
|
|
19
19
|
export { default as AdvancedTableNoSubrows } from './_advanced_table_no_subrows.jsx'
|
20
20
|
export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_selectable_rows_header.jsx'
|
21
21
|
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
22
|
-
export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
|
22
|
+
export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
|
23
|
+
export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import React, { useState } from "react"
|
2
|
+
import { useForm } from "react-hook-form"
|
3
|
+
import { Button, Checkbox, Flex, Body } from "playbook-ui"
|
4
|
+
|
5
|
+
const CheckboxReactHook = () => {
|
6
|
+
const { register, handleSubmit } = useForm({
|
7
|
+
defaultValues: {
|
8
|
+
Small: false,
|
9
|
+
Medium: false,
|
10
|
+
Large: false,
|
11
|
+
},
|
12
|
+
})
|
13
|
+
|
14
|
+
const [submittedData, setSubmittedData] = useState({
|
15
|
+
Small: false,
|
16
|
+
Medium: false,
|
17
|
+
Large: false,
|
18
|
+
})
|
19
|
+
|
20
|
+
const onSubmit = (data) => {
|
21
|
+
setSubmittedData(data)
|
22
|
+
}
|
23
|
+
|
24
|
+
return (
|
25
|
+
<Flex orientation="row">
|
26
|
+
<Flex align="start"
|
27
|
+
orientation="column"
|
28
|
+
paddingRight="lg"
|
29
|
+
>
|
30
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
31
|
+
<Checkbox padding="xs"
|
32
|
+
text="Small"
|
33
|
+
{...register("Small")}
|
34
|
+
/>
|
35
|
+
<br />
|
36
|
+
<Checkbox padding="xs"
|
37
|
+
text="Medium"
|
38
|
+
{...register("Medium")}
|
39
|
+
/>
|
40
|
+
<br />
|
41
|
+
<Checkbox padding="xs"
|
42
|
+
text="Large"
|
43
|
+
{...register("Large")}
|
44
|
+
/>
|
45
|
+
<br />
|
46
|
+
<Button htmlType="submit"
|
47
|
+
marginTop="sm"
|
48
|
+
text="submit"
|
49
|
+
/>
|
50
|
+
</form>
|
51
|
+
</Flex>
|
52
|
+
<Flex align="start"
|
53
|
+
orientation="column"
|
54
|
+
>
|
55
|
+
<Body padding="xs"
|
56
|
+
text={`Small: ${submittedData.Small ? "true" : "false"}`}
|
57
|
+
/>
|
58
|
+
<Body padding="xs"
|
59
|
+
text={`Medium: ${submittedData.Medium ? "true" : "false"}`}
|
60
|
+
/>
|
61
|
+
<Body padding="xs"
|
62
|
+
text={`Large: ${submittedData.Large ? "true" : "false"}`}
|
63
|
+
/>
|
64
|
+
</Flex>
|
65
|
+
</Flex>
|
66
|
+
)
|
67
|
+
}
|
68
|
+
|
69
|
+
export default CheckboxReactHook
|
@@ -0,0 +1 @@
|
|
1
|
+
You can pass react hook props to the checkbox kit.
|
@@ -11,6 +11,7 @@ examples:
|
|
11
11
|
react:
|
12
12
|
- checkbox_default: Default
|
13
13
|
- checkbox_checked: Load as checked
|
14
|
+
- checkbox_react_hook: React Hook Form
|
14
15
|
- checkbox_custom: Custom Checkbox
|
15
16
|
- checkbox_error: Default w/ Error
|
16
17
|
- checkbox_indeterminate: Indeterminate Checkbox
|
@@ -21,4 +22,4 @@ examples:
|
|
21
22
|
- checkbox_error_swift: Default w/ Error
|
22
23
|
- checkbox_indeterminate_swift: Indeterminate Checkbox
|
23
24
|
- checkbox_props_swift: ""
|
24
|
-
|
25
|
+
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export { default as CheckboxDefault } from './_checkbox_default.jsx'
|
2
2
|
export { default as CheckboxCustom } from './_checkbox_custom.jsx'
|
3
|
+
export { default as CheckboxReactHook } from './_checkbox_react_hook.jsx'
|
3
4
|
export { default as CheckboxError } from './_checkbox_error.jsx'
|
4
5
|
export { default as CheckboxChecked } from './_checkbox_checked.jsx'
|
5
6
|
export { default as CheckboxIndeterminate } from './_checkbox_indeterminate.jsx'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%= pb_rails("currency", props: {
|
2
|
+
amount: "",
|
3
|
+
label: "Nil",
|
4
|
+
margin_bottom: "md",
|
5
|
+
null_display: "--",
|
6
|
+
size: "sm"
|
7
|
+
}) %>
|
8
|
+
|
9
|
+
<%= pb_rails("currency", props: {
|
10
|
+
amount: "",
|
11
|
+
label: "Nil",
|
12
|
+
margin_bottom: "md",
|
13
|
+
null_display: "$0.00",
|
14
|
+
size: "sm"
|
15
|
+
}) %>
|
16
|
+
|
17
|
+
<%= pb_rails("currency", props: {
|
18
|
+
amount: "",
|
19
|
+
label: "Nil",
|
20
|
+
null_display: " ",
|
21
|
+
size: "sm"
|
22
|
+
}) %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Currency } from 'playbook-ui'
|
3
|
+
|
4
|
+
const CurrencyNullDisplay = (props) => {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<Currency
|
8
|
+
amount=""
|
9
|
+
label="Null"
|
10
|
+
marginBottom="md"
|
11
|
+
nullDisplay="--"
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
|
15
|
+
<Currency
|
16
|
+
amount=""
|
17
|
+
label="Null"
|
18
|
+
marginBottom="md"
|
19
|
+
nullDisplay="$0.00"
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
|
23
|
+
<Currency
|
24
|
+
amount=""
|
25
|
+
label="Null"
|
26
|
+
marginBottom="md"
|
27
|
+
nullDisplay=" "
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
</>
|
31
|
+
)
|
32
|
+
}
|
33
|
+
|
34
|
+
export default CurrencyNullDisplay
|
@@ -0,0 +1 @@
|
|
1
|
+
To customize how the `amount` field appears when it is empty, use the `null_display` prop and set it to the desired value you want to display.
|
@@ -0,0 +1 @@
|
|
1
|
+
To customize how the `amount` field appears when it is empty, use the `nullDisplay` prop and set it to the desired value you want to display.
|
@@ -10,6 +10,7 @@ examples:
|
|
10
10
|
- currency_unstyled: Unstyled
|
11
11
|
- currency_comma_separator: Comma Separator
|
12
12
|
- currency_negative: Negative
|
13
|
+
- currency_null_display: Null Display
|
13
14
|
|
14
15
|
react:
|
15
16
|
- currency_variants: Variants
|
@@ -21,6 +22,7 @@ examples:
|
|
21
22
|
- currency_unstyled: Unstyled
|
22
23
|
- currency_comma_separator: Comma Separator
|
23
24
|
- currency_negative: Negative
|
25
|
+
- currency_null_display: Null Display
|
24
26
|
|
25
27
|
swift:
|
26
28
|
- currency_size_swift: Size
|
@@ -6,4 +6,5 @@ export { default as CurrencyAbbreviated } from './_currency_abbreviated.jsx'
|
|
6
6
|
export { default as CurrencyMatchingDecimals } from './_currency_matching_decimals.jsx'
|
7
7
|
export { default as CurrencyUnstyled } from './_currency_unstyled.jsx'
|
8
8
|
export { default as CurrencyCommaSeparator } from './_currency_comma_separator.jsx'
|
9
|
-
export { default as CurrencyNegative } from './_currency_negative.jsx'
|
9
|
+
export { default as CurrencyNegative } from './_currency_negative.jsx'
|
10
|
+
export { default as CurrencyNullDisplay } from './_currency_null_display.jsx'
|
@@ -46,6 +46,7 @@
|
|
46
46
|
%>
|
47
47
|
<%= form.date_picker :example_date_picker_1, props: { label: true } %>
|
48
48
|
<%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true } %>
|
49
|
+
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true } %>
|
49
50
|
|
50
51
|
<%= form.actions do |action| %>
|
51
52
|
<%= action.submit %>
|
@@ -37,6 +37,7 @@
|
|
37
37
|
<%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
|
38
38
|
<%= form.date_picker :example_date_picker_2, props: { label: true, required: true } %>
|
39
39
|
<%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
|
40
|
+
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true, blank_selection: "Select a Time Zone...", required: true } %>
|
40
41
|
|
41
42
|
<%= form.actions do |action| %>
|
42
43
|
<%= action.submit %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { IconButton } from 'playbook-ui'
|
3
|
+
|
4
|
+
const IconButtonDefault = (props) => (
|
5
|
+
<div>
|
6
|
+
<IconButton
|
7
|
+
{...props}
|
8
|
+
/>
|
9
|
+
<IconButton
|
10
|
+
{...props}
|
11
|
+
marginTop="md"
|
12
|
+
variant="link"
|
13
|
+
/>
|
14
|
+
</div>
|
15
|
+
)
|
16
|
+
|
17
|
+
export default IconButtonDefault
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { IconButton, Flex } from 'playbook-ui'
|
3
|
+
|
4
|
+
const IconButtonSizes = (props) => (
|
5
|
+
<div>
|
6
|
+
<Flex align="center">
|
7
|
+
<IconButton
|
8
|
+
{...props}
|
9
|
+
size="lg"
|
10
|
+
/>
|
11
|
+
<span>Large</span>
|
12
|
+
</Flex>
|
13
|
+
<Flex align="center">
|
14
|
+
<IconButton
|
15
|
+
{...props}
|
16
|
+
size="sm"
|
17
|
+
/>
|
18
|
+
<span>Small</span>
|
19
|
+
</Flex>
|
20
|
+
<Flex align="center">
|
21
|
+
<IconButton
|
22
|
+
{...props}
|
23
|
+
size="xs"
|
24
|
+
/>
|
25
|
+
<span>XSmall</span>
|
26
|
+
</Flex>
|
27
|
+
<Flex
|
28
|
+
align="center"
|
29
|
+
marginTop="md"
|
30
|
+
>
|
31
|
+
<IconButton
|
32
|
+
{...props}
|
33
|
+
size="1x"
|
34
|
+
/>
|
35
|
+
<span>1x</span>
|
36
|
+
</Flex>
|
37
|
+
<Flex align="center">
|
38
|
+
<IconButton
|
39
|
+
{...props}
|
40
|
+
size="2x"
|
41
|
+
/>
|
42
|
+
<span>2x</span>
|
43
|
+
</Flex>
|
44
|
+
<Flex align="center">
|
45
|
+
<IconButton
|
46
|
+
{...props}
|
47
|
+
size="3x"
|
48
|
+
/>
|
49
|
+
<span>3x</span>
|
50
|
+
</Flex>
|
51
|
+
<Flex align="center">
|
52
|
+
<IconButton
|
53
|
+
{...props}
|
54
|
+
size="4x"
|
55
|
+
/>
|
56
|
+
<span>4x</span>
|
57
|
+
</Flex>
|
58
|
+
</div>
|
59
|
+
)
|
60
|
+
|
61
|
+
export default IconButtonSizes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React, { forwardRef } from 'react'
|
2
|
+
import {
|
3
|
+
Overlay,
|
4
|
+
Card,
|
5
|
+
Flex,
|
6
|
+
FlexItem,
|
7
|
+
} from 'playbook-ui'
|
8
|
+
|
9
|
+
const InlineCardsExample = forwardRef(function InlineCardsExample(ref) {
|
10
|
+
return (
|
11
|
+
<Flex
|
12
|
+
columnGap="lg"
|
13
|
+
orientation="row"
|
14
|
+
ref={ref}
|
15
|
+
>
|
16
|
+
{Array.from({ length: 15 }, (_, index) => (
|
17
|
+
<FlexItem key={index}>
|
18
|
+
<Card>{"Card Content"}</Card>
|
19
|
+
</FlexItem>
|
20
|
+
))}
|
21
|
+
</Flex>
|
22
|
+
)
|
23
|
+
})
|
24
|
+
|
25
|
+
const OverlayVerticalDynamicMultiDirectional = () => (
|
26
|
+
<>
|
27
|
+
<Overlay
|
28
|
+
color="card_light"
|
29
|
+
dynamic
|
30
|
+
layout={{"x": "xl"}}
|
31
|
+
>
|
32
|
+
<InlineCardsExample />
|
33
|
+
</Overlay>
|
34
|
+
</>
|
35
|
+
)
|
36
|
+
|
37
|
+
export default OverlayVerticalDynamicMultiDirectional
|
data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Pass the `dynamic` prop to make the overlay render while the scrollbar isn't at either end on the scrollbar. You must also add a `ref` to the child that's being passed through the Overlay.
|
@@ -1,3 +1,4 @@
|
|
1
1
|
export { default as OverlayDefault } from './_overlay_default.jsx'
|
2
2
|
export { default as OverlayMultiDirectional } from './_overlay_multi_directional.jsx'
|
3
3
|
export { default as OverlayToggle } from './_overlay_toggle.jsx'
|
4
|
+
export { default as OverlayVerticalDynamicMultiDirectional } from './_overlay_vertical_dynamic_multi_directional.jsx'
|