Commit 532ebc8 1 parent 3919125 commit 532ebc8 Copy full SHA for 532ebc8
File tree 4 files changed +18
-11
lines changed
components/src/components/tabs
react/src/components/Tabs
4 files changed +18
-11
lines changed Original file line number Diff line number Diff line change 42
42
display : flex ;
43
43
align-items : center ;
44
44
justify-content : space-between ;
45
- padding : 0 $spacing-05 ;
45
+ padding : 0 $spacing-09 0 $spacing- 05 ;
46
46
height : rem (40px );
47
47
cursor : pointer ;
48
48
color : $text-01 ;
60
60
}
61
61
62
62
.#{$prefix } --tabs-trigger svg {
63
- width : rem ( 12 px ) ;
64
- height : rem ( 7 px ) ;
63
+ position : absolute ;
64
+ right : $spacing-05 ;
65
65
fill : $ui-05 ;
66
66
transition : transform $duration--fast-01 motion (standard , productive );
67
67
}
90
90
padding-top : 2px ;
91
91
color : $text-01 ;
92
92
font-weight : 400 ;
93
+ white-space : nowrap ;
94
+ overflow : hidden ;
95
+ text-overflow : ellipsis ;
93
96
}
94
97
95
98
.#{$prefix } --tabs-trigger-text :hover {
274
277
background-color : $ui-01 ;
275
278
276
279
.#{$prefix } --tabs__nav-link {
280
+ line-height : calc (
281
+ #{rem (48px )} - (#{$spacing-03 } * 2 )
282
+ ); // height - vertical padding
277
283
// Draws the border without affecting the inner-content
278
284
box-shadow : inset 0 2px 0 0 $interactive-04 ;
279
285
border-bottom : none ;
333
339
334
340
.#{$prefix } --tabs--container a .#{$prefix } --tabs__nav-link {
335
341
@include carbon--breakpoint (md) {
336
- display : flex ;
337
- align-items : center ;
338
342
height : rem (48px );
343
+ line-height : calc (
344
+ #{rem (48px )} - (#{$spacing-03 } * 2 )
345
+ ); // height - vertical padding
339
346
border-bottom : none ;
340
347
}
341
348
}
Original file line number Diff line number Diff line change 8
8
<div data-tabs class =" {{ @root.prefix }} --tabs{{ #if container }} {{ @root.prefix }} --tabs--container{{ /if }} " >
9
9
<div class =" {{ @root.prefix }} --tabs-trigger" tabindex =" 0" >
10
10
<a href =" javascript:void(0)" class =" {{ @root.prefix }} --tabs-trigger-text" tabindex =" -1" ></a >
11
- {{ carbon-icon ' ChevronDownGlyph ' }}
11
+ {{ carbon-icon ' ChevronDown16 ' }}
12
12
</div >
13
13
<ul class =" {{ @root.prefix }} --tabs__nav {{ @root.prefix }} --tabs__nav--hidden" role =" tablist" >
14
14
{{ #each items }}
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
import React from 'react' ;
9
- import { ChevronDownGlyph } from '@carbon/icons-react' ;
9
+ import { ChevronDown16 } from '@carbon/icons-react' ;
10
10
import { settings } from 'carbon-components' ;
11
11
import { shallow , mount } from 'enzyme' ;
12
12
import Tabs from '../Tabs' ;
@@ -102,7 +102,7 @@ describe('Tabs', () => {
102
102
} ) ;
103
103
104
104
it ( 'renders <Icon>' , ( ) => {
105
- expect ( trigger . find ( ChevronDownGlyph ) . length ) . toBe ( 1 ) ;
105
+ expect ( trigger . find ( ChevronDown16 ) . length ) . toBe ( 1 ) ;
106
106
} ) ;
107
107
} ) ;
108
108
Original file line number Diff line number Diff line change 8
8
import PropTypes from 'prop-types' ;
9
9
import React from 'react' ;
10
10
import classNames from 'classnames' ;
11
- import { ChevronDownGlyph } from '@carbon/icons-react' ;
11
+ import { ChevronDown16 } from '@carbon/icons-react' ;
12
12
import { settings } from 'carbon-components' ;
13
13
import { keys , match , matches } from '../../internal/keyboard' ;
14
14
@@ -294,9 +294,9 @@ export default class Tabs extends React.Component {
294
294
onClick = { this . handleDropdownClick } >
295
295
{ selectedLabel }
296
296
</ a >
297
- < ChevronDownGlyph aria-hidden = "true" >
297
+ < ChevronDown16 aria-hidden = "true" >
298
298
{ iconDescription && < title > { iconDescription } </ title > }
299
- </ ChevronDownGlyph >
299
+ </ ChevronDown16 >
300
300
</ div >
301
301
< ul role = "tablist" className = { classes . tablist } >
302
302
{ tabsWithProps }
You can’t perform that action at this time.
0 commit comments