playbook_ui 12.33.1.pre.alpha.PLAY933navkitcollapsible994 → 12.33.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -6
  3. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +11 -19
  4. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +14 -27
  5. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +2 -7
  6. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.rb +7 -2
  7. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.md +1 -1
  8. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +1 -3
  9. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +0 -1
  10. data/app/pb_kits/playbook/pb_collapsible/index.js +3 -3
  11. data/app/pb_kits/playbook/pb_collapsible/types.d.ts +1 -0
  12. data/app/pb_kits/playbook/pb_nav/_item.tsx +49 -98
  13. data/app/pb_kits/playbook/pb_nav/_nav.scss +0 -1
  14. data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +11 -9
  15. data/app/pb_kits/playbook/pb_nav/docs/example.yml +0 -3
  16. data/app/pb_kits/playbook/pb_nav/docs/index.js +0 -2
  17. data/app/pb_kits/playbook/pb_nav/item.html.erb +12 -34
  18. data/app/pb_kits/playbook/pb_nav/item.rb +0 -5
  19. data/dist/playbook-rails.js +6 -6
  20. data/lib/playbook/version.rb +2 -2
  21. metadata +8 -15
  22. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +0 -25
  23. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.html.erb +0 -10
  24. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +0 -19
  25. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.md +0 -2
  26. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +0 -6
  27. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +0 -24
  28. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +0 -83
  29. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom_icons.jsx +0 -86
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33130ba9d6074894b7db63e664ca3a35730c9ac366285de0bcfb7bc78fbb88a9
4
- data.tar.gz: e2b5fe4b62c4117d14b09cdd7e9ec93de3678c54b8575b4c1e6ccf26edac759f
3
+ metadata.gz: f1468abb19e4ac525eed445f416c38c07658000bf453c5a0b874be54c64ecdb3
4
+ data.tar.gz: b74c0cb81586fcb391013b1f6d46414a36dc98196fbec2d933359b978fee1483
5
5
  SHA512:
6
- metadata.gz: 1ec5221a8aa347f88b9483e371eefafae1fbdd9e340e7b8029fa077eac7f03c3ef5536564b677367698b58489dee4415b77298de4efa5ac62d08078eb8dde54e
7
- data.tar.gz: e95ca7bbcba72fbc6fc2309a09aec09f4b9ae3ab616837192a520c1b337b221a2656062f9ebbb27ae4832df39b592453d56cc39c436f533e8f32490e0ca586a3
6
+ metadata.gz: 4e2bb9dad3c8d08921eea44a7e9a3d8ec5832bbcce47f81b75c65fc0bd7eda0218ce328b9820f4bd530a2fb28233816bfdf404762700cb48ab98aee2c16d4308
7
+ data.tar.gz: 2c4fb8680f9f5e13e9462bc1ec206edf07a773739c7c282b32d7ed1c279ac3ab0ed42d4da46829328010f4e33159823325188e99941e8d144807384be861f794
@@ -7,18 +7,17 @@ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
7
  import CollapsibleContent from './child_kits/CollapsibleContent'
8
8
  import CollapsibleMain from './child_kits/CollapsibleMain'
9
9
  import CollapsibleContext from './context'
10
- import { IconSizes } from "../pb_icon/_icon"
10
+ import IconSizes from "../pb_icon/_icon"
11
11
 
12
12
 
13
13
  type CollapsibleProps = {
14
- children?: JSX.Element | [] | any,
14
+ children?: JSX.Element | [],
15
15
  aria?: {[key: string]: string},
16
16
  className?: string,
17
17
  collapsed?: boolean,
18
18
  data?: object,
19
- icon?: Object,
20
19
  iconColor?: 'default' | 'light' | 'lighter' | 'link' | 'error' | 'success',
21
- iconSize?: IconSizes
20
+ iconSize?: typeof IconSizes
22
21
  id?: string,
23
22
  padding?: string,
24
23
  }
@@ -38,7 +37,6 @@ const Collapsible = ({
38
37
  children = [],
39
38
  collapsed = true,
40
39
  data = {},
41
- icon,
42
40
  iconColor = 'default',
43
41
  iconSize,
44
42
  id,
@@ -66,7 +64,7 @@ const Collapsible = ({
66
64
  )
67
65
 
68
66
  return (
69
- <CollapsibleContext.Provider value={{ collapsed: isCollapsed, collapse, icon, iconSize, iconColor }}>
67
+ <CollapsibleContext.Provider value={{ collapsed: isCollapsed, collapse, iconSize, iconColor }}>
70
68
  <div
71
69
  {...ariaProps}
72
70
  {...dataProps}
@@ -1,8 +1,8 @@
1
1
  import classnames from 'classnames'
2
- import React, { useContext, useRef, useEffect } from 'react'
2
+ import React, { useContext } from 'react'
3
+ import AnimateHeight from 'react-animate-height'
3
4
  import { buildCss } from '../../utilities/props'
4
5
  import { globalProps } from '../../utilities/globalProps'
5
- import { hideElement, showElement } from '../_helper_functions'
6
6
 
7
7
  import CollapsibleContext from '../context'
8
8
 
@@ -21,25 +21,17 @@ const CollapsibleContent = ({
21
21
  const context: {[key: string]: boolean | string} = useContext(CollapsibleContext)
22
22
  const contentCSS = buildCss('pb_collapsible_content_kit')
23
23
  const contentSpacing = globalProps(props, { padding })
24
- const contentRef = useRef(null);
25
-
26
- useEffect(() => {
27
- // Use the showElement and hideElement functions based on the context value
28
- if (contentRef.current) {
29
- if (context.collapsed) {
30
- hideElement(contentRef.current);
31
- } else {
32
- showElement(contentRef.current);
33
- }
34
- }
35
- }, [context.collapsed]);
36
24
 
37
25
  return (
38
- <div ref={contentRef}
39
- data-collapsible-content="true"
40
- className={classnames(contentCSS, contentSpacing, "toggle-content", className)}>
41
- {children}
42
- </div>
26
+ <AnimateHeight
27
+ duration={400}
28
+ height={context.collapsed ? 0 : 'auto'}
29
+ id="bottom-section"
30
+ >
31
+ <div className={classnames(contentCSS, className, contentSpacing)}>
32
+ {children}
33
+ </div>
34
+ </AnimateHeight>
43
35
  )
44
36
  }
45
37
 
@@ -7,7 +7,6 @@ import { globalProps } from '../../utilities/globalProps'
7
7
 
8
8
  import Flex from '../../pb_flex/_flex'
9
9
  import FlexItem from '../../pb_flex/_flex_item'
10
- import Icon, { IconSizes } from "../../pb_icon/_icon"
11
10
  import CollapsibleContext from '../context'
12
11
 
13
12
 
@@ -40,35 +39,24 @@ type IconColors = "default" | "light" | "lighter" | "link" | "error" | "success
40
39
 
41
40
  type IconProps = {
42
41
  collapsed: boolean | (()=> void)
43
- icon?: string[] | string
44
42
  iconColor?: IconColors
45
- iconSize?: IconSizes
43
+ iconSize?: string | (() => void)
46
44
  }
47
45
 
48
- const ToggleIcon = ({ collapsed, icon, iconSize, iconColor }: IconProps) => {
46
+ const Icon = ({ collapsed, iconSize, iconColor }: IconProps) => {
47
+ const direction = collapsed ? 'down' : 'up'
48
+ const size = iconSize
49
49
  const color = colorMap[iconColor]
50
50
 
51
51
  return (
52
- <>
53
- {collapsed ? (
54
- <div
55
- className="icon_wrapper"
56
- key="chevron-down"
57
- style={{ verticalAlign: "middle", color: color }}
58
- >
59
- <Icon icon={icon ? icon[0] : "chevron-down"} size={iconSize} />
60
- </div>
61
- ) : (
62
- <div
63
- className="icon_wrapper"
64
- key="chevron-up"
65
- style={{ verticalAlign: "middle", color: color }}
66
- >
67
- <Icon icon={icon ? icon[1] : "chevron-up"} size={iconSize} />
68
- </div>
69
- )}
70
- </>
71
- );
52
+ <div
53
+ className="icon_wrapper"
54
+ key={direction}
55
+ style={{ verticalAlign: 'middle', color: color }}
56
+ >
57
+ <i className={`far fa-chevron-${direction} fa-fw ${size && `fa-${size}`}`} />
58
+ </div>
59
+ )
72
60
  }
73
61
 
74
62
  const CollapsibleMain = ({
@@ -91,11 +79,10 @@ const CollapsibleMain = ({
91
79
  >
92
80
  <FlexItem>{children}</FlexItem>
93
81
  <FlexItem>
94
- <ToggleIcon
82
+ <Icon
95
83
  collapsed={context.collapsed as () => void}
96
84
  iconColor={context.iconColor as IconColors}
97
- iconSize={context.iconSize as IconSizes}
98
- icon={context.icon as string[] | string}
85
+ iconSize={context.iconSize}
99
86
  />
100
87
  </FlexItem>
101
88
  </Flex>
@@ -10,13 +10,8 @@
10
10
  <% end %>
11
11
  <%= pb_rails("flex/flex_item") do %>
12
12
  <div style="color: <%= object.icon_color %>">
13
- <% if object.icon.present? %>
14
- <%= pb_rails("icon", props: { icon: "#{icon[0]}", id:"collapsible_open_icon", size: object.size }) %>
15
- <%= pb_rails("icon", props: { icon: "#{icon[1]}", id:"collapsible_close_icon", size: object.size }) %>
16
- <% else %>
17
- <%= pb_rails("icon", props: { icon: "chevron-down", id:"collapsible_open_icon", size: object.size }) %>
18
- <%= pb_rails("icon", props: { icon: "chevron-up", id:"collapsible_close_icon", size: object.size }) %>
19
- <% end %>
13
+ <i class="far fa-chevron-down <%= object.icon_size %>"></i>
14
+ <i class="far fa-chevron-up <%= object.icon_size %>"></i>
20
15
  </div>
21
16
  <% end %>
22
17
  <% end %>
@@ -6,8 +6,6 @@ module Playbook
6
6
  prop :color, type: Playbook::Props::Enum,
7
7
  values: %w[default light lighter link success error],
8
8
  default: "default"
9
- prop :icon, type: Playbook::Props::Array,
10
- default: []
11
9
  prop :size, type: Playbook::Props::Enum,
12
10
  values: ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x", nil],
13
11
  default: nil
@@ -19,6 +17,13 @@ module Playbook
19
17
  generate_classname("pb_collapsible_main_kit", padding, separator: " ")
20
18
  end
21
19
 
20
+ def icon_size
21
+ return "" if size.nil?
22
+
23
+ size_object = { lg: "fa-lg", xs: "fa-xs", sm: "fa-sm", "1x": "fa-1x", "2x": "fa-2x", "3x": "fa-3x", "4x": "fa-4x", "5x": "fa-5x", "6x": "fa-6x", "7x": "fa-7x", "8x": "fa-8x", "9x": "fa-9x", "10x": "fa-10x" }
24
+ size_object[size.to_sym]
25
+ end
26
+
22
27
  def icon_color
23
28
  return "" if color.nil?
24
29
 
@@ -1,4 +1,4 @@
1
1
  ##### Prop
2
- This kit uses `icon` sizes. If you don't give it a size, it will default to medium. This can be replaced with the sizes below:
2
+ This kit uses `icon` sizes. If you don't give it a size, it will default to medium. You can be replaced with the sizes below:
3
3
 
4
4
  * `lg` `xs` `sm` `1x` `2x` `3x` `4x` `5x` `6x` `7x` `8x` `9x` `10x`
@@ -4,10 +4,8 @@ examples:
4
4
  - collapsible_default: Default
5
5
  - collapsible_size: Size
6
6
  - collapsible_color: Color
7
- - collapsible_icons: Custom Icons
8
7
 
9
8
  react:
10
9
  - collapsible_default: Default
11
10
  - collapsible_size: Size
12
- - collapsible_color: Color
13
- - collapsible_icons: Custom Icons
11
+ - collapsible_color: Color
@@ -1,4 +1,3 @@
1
1
  export { default as CollapsibleDefault } from './_collapsible_default.jsx'
2
2
  export { default as CollapsibleSize } from './_collapsible_size.jsx'
3
3
  export { default as CollapsibleColor } from './_collapsible_color.jsx'
4
- export { default as CollapsibleIcons } from './_collapsible_icons.jsx'
@@ -2,8 +2,8 @@ import PbEnhancedElement from '../pb_enhanced_element'
2
2
 
3
3
  const MAIN_SELECTOR = '[data-collapsible-main]'
4
4
  const CONTENT_SELECTOR = '[data-collapsible-content]'
5
- const DOWN_ARROW_SELECTOR = '#collapsible_open_icon'
6
- const UP_ARROW_SELECTOR = '#collapsible_close_icon'
5
+ const DOWN_ARROW_SELECTOR = '.fa-chevron-down'
6
+ const UP_ARROW_SELECTOR = '.fa-chevron-up'
7
7
 
8
8
  export default class PbCollapsible extends PbEnhancedElement {
9
9
  static get selector() {
@@ -75,5 +75,5 @@ export default class PbCollapsible extends PbEnhancedElement {
75
75
  displayUpArrow() {
76
76
  this.element.querySelector(UP_ARROW_SELECTOR).style.display = 'inline-block'
77
77
  this.element.querySelector(DOWN_ARROW_SELECTOR).style.display = 'none'
78
- }
78
+ }
79
79
  }
@@ -0,0 +1 @@
1
+ declare module 'react-animate-height'
@@ -6,17 +6,15 @@ import { globalProps, GlobalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Icon from '../pb_icon/_icon'
8
8
  import Image from '../pb_image/_image'
9
- import Collapsible from '../pb_collapsible/_collapsible'
10
9
 
11
10
  type NavItemProps = {
12
11
  active?: boolean,
13
12
  aria?: { [key: string]: string },
14
13
  children?: React.ReactNode[] | React.ReactNode,
15
14
  className?: string,
16
- collapsible?: boolean,
17
15
  data?: object,
18
16
  iconLeft?: string,
19
- iconRight?: string | string[],
17
+ iconRight?: string,
20
18
  id?: string,
21
19
  imageUrl?: string,
22
20
  link?: string,
@@ -31,7 +29,6 @@ const NavItem = (props: NavItemProps) => {
31
29
  aria = {},
32
30
  children,
33
31
  className,
34
- collapsible,
35
32
  data = {},
36
33
  iconLeft,
37
34
  iconRight,
@@ -56,100 +53,54 @@ const NavItem = (props: NavItemProps) => {
56
53
  className={classes}
57
54
  id={id}
58
55
  >
59
- {
60
- collapsible ? (
61
- <Collapsible icon={iconRight ? iconRight : ['plus','minus']} iconSize="xs" padding="none">
62
- <Collapsible.Main>
63
- <Tag
64
- className="pb_nav_list_item_link"
65
- href={link}
66
- onClick={onClick}
67
- target={target}
68
- >
69
- {imageUrl &&
70
- <div
71
- className="pb_nav_list_item_icon_section"
72
- key={imageUrl}
73
- >
74
- <Image
75
- className="pb_nav_img_wrapper"
76
- url={imageUrl}
77
- />
78
- </div>
79
- }
80
-
81
- {iconLeft &&
82
- <div
83
- className="pb_nav_list_item_icon_section"
84
- key={iconLeft}
85
- >
86
- <Icon
87
- className="pb_nav_list_item_icon_left"
88
- fixedWidth
89
- icon={iconLeft}
90
- />
91
- </div>
92
- }
93
- <span className="pb_nav_list_item_text">
94
- {text}
95
- </span>
96
- </Tag>
97
- </Collapsible.Main>
98
- <Collapsible.Content>
99
- {children}
100
- </Collapsible.Content>
101
- </Collapsible>
102
- ) : (
103
- <Tag
104
- className="pb_nav_list_item_link"
105
- href={link}
106
- onClick={onClick}
107
- target={target}
108
- >
109
- {imageUrl &&
110
- <div
111
- className="pb_nav_list_item_icon_section"
112
- key={imageUrl}
113
- >
114
- <Image
115
- className="pb_nav_img_wrapper"
116
- url={imageUrl}
117
- />
118
- </div>
119
- }
120
-
121
- {iconLeft &&
122
- <div
123
- className="pb_nav_list_item_icon_section"
124
- key={iconLeft}
125
- >
126
- <Icon
127
- className="pb_nav_list_item_icon_left"
128
- fixedWidth
129
- icon={iconLeft}
130
- />
131
- </div>
132
- }
133
-
134
- <span className="pb_nav_list_item_text">
135
- {text || children}
136
- </span>
137
-
138
- {iconRight &&
139
- <div
140
- className="pb_nav_list_item_icon_section"
141
- key={iconRight as string}
142
- >
143
- <Icon
144
- className="pb_nav_list_item_icon_right"
145
- fixedWidth
146
- icon={iconRight as string}
147
- />
148
- </div>
149
- }
150
- </Tag>
151
- )
152
- }
56
+ <Tag
57
+ className="pb_nav_list_item_link"
58
+ href={link}
59
+ onClick={onClick}
60
+ target={target}
61
+ >
62
+ {imageUrl &&
63
+ <div
64
+ className="pb_nav_list_item_icon_section"
65
+ key={imageUrl}
66
+ >
67
+ <Image
68
+ className="pb_nav_img_wrapper"
69
+ url={imageUrl}
70
+ />
71
+ </div>
72
+ }
73
+
74
+ {iconLeft &&
75
+ <div
76
+ className="pb_nav_list_item_icon_section"
77
+ key={iconLeft}
78
+ >
79
+ <Icon
80
+ className="pb_nav_list_item_icon_left"
81
+ fixedWidth
82
+ icon={iconLeft}
83
+ />
84
+ </div>
85
+ }
86
+
87
+ <span className="pb_nav_list_item_text">
88
+ {text || children}
89
+ </span>
90
+
91
+ {iconRight &&
92
+ <div
93
+ className="pb_nav_list_item_icon_section"
94
+ key={iconRight}
95
+ >
96
+ <Icon
97
+ className="pb_nav_list_item_icon_right"
98
+ fixedWidth
99
+ icon={iconRight}
100
+ />
101
+ </div>
102
+ }
103
+ </Tag>
153
104
  </li>
154
105
  )
155
106
  }
@@ -4,4 +4,3 @@
4
4
  @import "../tokens/colors";
5
5
  @import "./vertical_nav";
6
6
  @import "./horizontal_nav";
7
- @import "./collapsible_nav";
@@ -29,20 +29,22 @@
29
29
  flex: 1;
30
30
  font-weight: $regular;
31
31
  }
32
+ @media (hover:hover) {
33
+ &:hover {
34
+ background-color: rgba($primary, 0.03);
35
+ [class*=_icon] {
36
+ color: $primary;
37
+ }
38
+ [class*=_text] {
39
+ color: $primary;
40
+ }
41
+ }
42
+ }
32
43
  }
33
44
  &[class*=_active] [class*=_link] {
34
45
  @include pb_title_4;
35
46
  color: $primary;
36
47
  letter-spacing: normal;
37
48
  }
38
- &:hover {
39
- background-color: rgba($primary, 0.03);
40
- [class*=_icon] {
41
- color: $primary;
42
- }
43
- [class*=_text] {
44
- color: $primary;
45
- }
46
- }
47
49
  }
48
50
  }
@@ -7,7 +7,6 @@ examples:
7
7
  - borderless_nav: No Borders
8
8
  - subtle_nav: Subtle Variant
9
9
  - subtle_with_icons_nav: Subtle With Icons
10
- - collapsible_nav: Subtle With Collapsible
11
10
  - subtle_no_highlight_nav: Subtle No Highlight
12
11
  - bold_vertical_nav: Bold Variant
13
12
  - horizontal_nav: Horizontal Nav
@@ -25,8 +24,6 @@ examples:
25
24
  - borderless_nav: No Borders
26
25
  - subtle_nav: Subtle Variant
27
26
  - subtle_with_icons_nav: Subtle With Icons
28
- - collapsible_nav: Subtle With Collapsible
29
- - collapsible_nav_custom_icons: Subtle With Collapsible (Custom Toggle Icons)
30
27
  - subtle_no_highlight_nav: Subtle No Highlight
31
28
  - bold_vertical_nav: Bold Variant
32
29
  - horizontal_nav: Horizontal Nav
@@ -13,5 +13,3 @@ export { default as WithImgNav } from './_with_img_nav.jsx'
13
13
  export { default as NewTab } from './_new_tab.jsx'
14
14
  export { default as BoldHorizontalNav } from './_bold_horizontal_nav.jsx'
15
15
  export { default as BoldVerticalNav } from './_bold_vertical_nav.jsx'
16
- export { default as CollapsibleNav } from './_collapsible_nav.jsx'
17
- export { default as CollapsibleNavCustomIcons } from './_collapsible_nav_custom_icons.jsx'
@@ -3,41 +3,19 @@
3
3
  class: object.classname,
4
4
  data: object.data,
5
5
  id: object.id) do %>
6
- <% if object.collapsible %>
7
- <%= pb_rails("collapsible", props: { name: "collapsible-nav-example" }) do %>
8
- <%= pb_rails("collapsible/collapsible_main", props: { name: "default-collapsible-nav", icon: object.collapsible_icons, size: "xs" }) do %>
9
- <%= content_tag(object.tag,
10
- object.link ? object.link_options : object.options) do %>
11
- <% if object.image_url %>
12
- <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
13
- <% end %>
14
- <% if object.icon_left %>
15
- <%= pb_rails("icon", props: { icon: object.icon_left, classname: "pb_nav_list_item_icon_left", fixed_width: true}) %>
16
- <% end %>
17
- <span class="pb_nav_list_item_text">
18
- <%= object.text %>
19
- </span>
20
- <% end %>
21
- <% end %>
22
- <%= pb_rails("collapsible/collapsible_content") do %>
23
- <%= content.presence %>
24
- <% end %>
6
+ <%= content_tag(object.tag,
7
+ object.link ? object.link_options : object.options) do %>
8
+ <% if object.image_url %>
9
+ <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
25
10
  <% end %>
26
- <% else %>
27
- <%= content_tag(object.tag,
28
- object.link ? object.link_options : object.options) do %>
29
- <% if object.image_url %>
30
- <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
31
- <% end %>
32
- <% if object.icon_left %>
33
- <%= pb_rails("icon", props: { icon: object.icon_left, classname: "pb_nav_list_item_icon_left", fixed_width: true}) %>
34
- <% end %>
35
- <span class="pb_nav_list_item_text">
36
- <%= object.text %><%= content.presence %>
37
- </span>
38
- <% if object.icon_right %>
39
- <%= pb_rails("icon", props: { icon: object.icon_right, classname: "pb_nav_list_item_icon_right", fixed_width: true}) %>
40
- <% end %>
11
+ <% if object.icon_left %>
12
+ <%= pb_rails("icon", props: { icon: object.icon_left, classname: "pb_nav_list_item_icon_left", fixed_width: true}) %>
13
+ <% end %>
14
+ <span class="pb_nav_list_item_text">
15
+ <%= object.text %><%= content.presence %>
16
+ </span>
17
+ <% if object.icon_right %>
18
+ <%= pb_rails("icon", props: { icon: object.icon_right, classname: "pb_nav_list_item_icon_right", fixed_width: true}) %>
41
19
  <% end %>
42
20
  <% end %>
43
21
  <% end %>
@@ -4,7 +4,6 @@ module Playbook
4
4
  module PbNav
5
5
  class Item < Playbook::KitBase
6
6
  prop :active, type: Playbook::Props::Boolean, default: false
7
- prop :collapsible, type: Playbook::Props::Boolean, default: false
8
7
  prop :link
9
8
  prop :text
10
9
  prop :icon_left
@@ -34,10 +33,6 @@ module Playbook
34
33
  )
35
34
  end
36
35
 
37
- def collapsible_icons
38
- icon_right.present? ? icon_right : %w[plus minus]
39
- end
40
-
41
36
  private
42
37
 
43
38
  def active_class