File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
uikit-workshop/src/scripts/components/pl-nav Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ const ui_builder = function() {
175
175
*/
176
176
function addPatternType ( patternlab , pattern ) {
177
177
patternlab . patternTypes . push ( {
178
- patternTypeLC : pattern . patternGroup . toLowerCase ( ) ,
178
+ patternTypeLC : _ . kebabCase ( pattern . patternGroup ) ,
179
179
patternTypeUC : _ . startCase ( pattern . patternGroup ) ,
180
180
patternType : pattern . patternType ,
181
181
patternTypeDash : pattern . patternGroup , //todo verify
@@ -234,7 +234,7 @@ const ui_builder = function() {
234
234
*/
235
235
function addPatternSubType ( patternlab , pattern ) {
236
236
const newSubType = {
237
- patternSubtypeLC : pattern . patternSubGroup . toLowerCase ( ) ,
237
+ patternSubtypeLC : _ . kebabCase ( pattern . patternSubGroup ) ,
238
238
patternSubtypeUC : _ . startCase ( pattern . patternSubGroup ) ,
239
239
patternSubtype : pattern . patternSubType ,
240
240
patternSubtypeDash : pattern . patternSubGroup , //todo verify
Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ class Nav extends BaseComponent {
276
276
< NavList
277
277
elem = { this . elem }
278
278
category = { patternSubtype . patternSubtypeLC }
279
+ categoryName = { patternSubtype . patternSubtypeUC }
279
280
>
280
281
{ patternSubtype . patternSubtypeItems }
281
282
</ NavList >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export const NavLink = props => {
16
16
data-patternpartial = { props . item . patternPartial }
17
17
>
18
18
{ props . item . isDocPattern && props . category
19
- ? `${ props . category } `
19
+ ? `${ props . categoryName } `
20
20
: props . item . patternName }
21
21
{ props . item . patternState && (
22
22
< PatternState variant = { props . item . patternState } />
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { NavLink } from './NavLink';
4
4
import { NavItem } from './NavItem' ;
5
5
6
6
export const NavList = props => {
7
- const { children, category, elem } = props ;
7
+ const { children, category, categoryName , elem } = props ;
8
8
const reorderedChildren = [ ] ;
9
9
10
10
const nonViewAllItems = elem . noViewAll
@@ -25,6 +25,7 @@ export const NavList = props => {
25
25
< div class = "pl-c-nav__link--overview-wrapper" >
26
26
< NavLink
27
27
category = { category }
28
+ categoryName = { categoryName }
28
29
item = { patternSubtypeItem }
29
30
elem = { elem }
30
31
/>
@@ -34,14 +35,14 @@ export const NavList = props => {
34
35
aria-controls = { category }
35
36
onClick = { elem . toggleSpecialNavPanel }
36
37
>
37
- { category }
38
+ { categoryName }
38
39
</ NavToggle >
39
40
) }
40
41
</ div >
41
42
) )
42
43
) : (
43
44
< Button aria-controls = { category } onClick = { elem . toggleNavPanel } >
44
- { category }
45
+ { categoryName }
45
46
</ Button >
46
47
) }
47
48
@@ -55,6 +56,7 @@ export const NavList = props => {
55
56
< NavItem >
56
57
< NavLink
57
58
category = { category }
59
+ categoryName = { categoryName }
58
60
item = { patternSubtypeItem }
59
61
elem = { elem }
60
62
/>
You can’t perform that action at this time.
0 commit comments