Skip to content

Commit

Permalink
Merge branch 'master' into update-button-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Aug 13, 2020
2 parents 3e3437e + 3603c06 commit 6e0edfb
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 34 deletions.
1 change: 1 addition & 0 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -22861,6 +22861,7 @@ Slider styles
@include type-style('code-02');

color: $text-01;
white-space: nowrap;

&:last-of-type {
margin-right: $carbon--spacing-05;
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/components/slider/_slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
@include type-style('code-02');

color: $text-01;
white-space: nowrap;

&:last-of-type {
margin-right: $carbon--spacing-05;
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/globals/scss/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

@import 'helper-classes';
@import './vendor/@carbon/elements/scss/layout/layout';

/// @access private
/// @type Map
Expand Down
44 changes: 22 additions & 22 deletions packages/pictograms/pictograms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
- science
- biology
- name: chart--3D
friendly_name: chart--3D
friendly_name: Chart 3D
aliases:
- chart
- chart
Expand All @@ -460,7 +460,7 @@
- analytics
- data analytics
- name: chart--area
friendly_name: chart--area
friendly_name: Chart area
aliases:
- chart area
- chart
Expand All @@ -480,7 +480,7 @@
- analytics
- data analytics
- name: chart--bubble
friendly_name: bubble--chart
friendly_name: Chart bubble
aliases:
- chart bubble
- chart
Expand All @@ -500,7 +500,7 @@
- analytics
- data analytics
- name: chart--candlestick
friendly_name: candlestick--chart
friendly_name: Chart candlestick
aliases:
- chart
- candlestick
Expand All @@ -519,7 +519,7 @@
- analytics
- data analytics
- name: chart--error-bar
friendly_name: chart--error-bar
friendly_name: Chart error bar
aliases:
- chart error bar
- chart error
Expand All @@ -529,7 +529,7 @@
- analytics
- data analytics
- name: chart--evaluation
friendly_name: chart--evaluation
friendly_name: Chart evaluation
aliases:
- chart evaluation
- chart
Expand All @@ -542,7 +542,7 @@
- study
- analyze
- name: chart--high-low
friendly_name: chart--high-low
friendly_name: Chart high low
aliases:
- chart high low
- chart
Expand All @@ -552,7 +552,7 @@
- analytics
- data analytics
- name: chart--histogram
friendly_name: chart--histogram
friendly_name: Chart histogram
aliases:
- chart histogram
- chart
Expand All @@ -572,7 +572,7 @@
- analytics
- data analytics
- name: chart--multi-line
friendly_name: chart--multi-line
friendly_name: Chart multi line
aliases:
- chart multi line
- chart
Expand All @@ -593,7 +593,7 @@
- analytics
- data analytics
- name: chart--parallel
friendly_name: chart--parallel
friendly_name: Chart parallel
aliases:
- chart parallel
- chart
Expand All @@ -613,7 +613,7 @@
- analytics
- data analytics
- name: chart--radar
friendly_name: chart--radar
friendly_name: Chart radar
aliases:
- chart radar
- chart
Expand All @@ -623,7 +623,7 @@
- analytics
- data analytics
- name: chart--river
friendly_name: chart--river
friendly_name: Chart river
aliases:
- chart river
- chart
Expand Down Expand Up @@ -665,7 +665,7 @@
- analytics
- data analytics
- name: chart--t-SNE
friendly_name: chart--t-SNE
friendly_name: Chart t-SNE
aliases:
- chart t-SNE
- chart
Expand Down Expand Up @@ -704,7 +704,7 @@
- debit
- chip
- name: circle-packing
friendly_name: circle-packing
friendly_name: Circle packing
aliases:
- circle packing
- chart
Expand Down Expand Up @@ -1912,7 +1912,7 @@
- data analytics
- analytics
- name: heat-map--02
friendly_name: heat-map--02
friendly_name: Heat map 02
aliases:
- heat map 02
- heat
Expand Down Expand Up @@ -2833,7 +2833,7 @@
- security
- people
- name: population-diagram
friendly_name: population-diagram
friendly_name: Population diagram
aliases:
- population diagram
- population
Expand Down Expand Up @@ -2929,7 +2929,7 @@
- strategy
- approach
- name: q-q-plot
friendly_name: q-q-plot
friendly_name: Q-Q plot
aliases:
- q q plot
- qq plot
Expand Down Expand Up @@ -3013,7 +3013,7 @@
- watson
- AI
- name: relationship-diagram
friendly_name: relationship-diagram
friendly_name: Relationship diagram
aliases:
- relationship diagram
- relationship
Expand Down Expand Up @@ -3170,7 +3170,7 @@
- weight
- healthcare
- name: scatter-matrix
friendly_name: scatter-matrix
friendly_name: Scatter matrix
aliases:
- scatter matrix
- scatter
Expand Down Expand Up @@ -3813,7 +3813,7 @@
- garbage
- dustbin
- name: tree--diagram
friendly_name: tree--diagram
friendly_name: Tree diagram
aliases:
- tree diagram
- tree
Expand All @@ -3822,7 +3822,7 @@
- analytics
- data analytics
- name: tree--map
friendly_name: tree--map
friendly_name: Tree map
aliases:
- tree map
- tree
Expand Down Expand Up @@ -4106,7 +4106,7 @@
- wireless
- home
- name: word-cloud
friendly_name: word-cloud
friendly_name: Word cloud
aliases:
- word cloud
- word
Expand Down
2 changes: 2 additions & 0 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4140,6 +4140,7 @@ Map {
},
},
"PaginationNav" => Object {
"$$typeof": Symbol(react.forward_ref),
"propTypes": Object {
"className": Object {
"type": "string",
Expand All @@ -4163,6 +4164,7 @@ Map {
"type": "func",
},
},
"render": [Function],
},
"PrimaryButton" => Object {},
"ProgressIndicator" => Object {
Expand Down
29 changes: 17 additions & 12 deletions packages/react/src/components/PaginationNav/PaginationNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,19 @@ function PaginationOverflow({
return null;
}

export default function PaginationNav({
className,
onChange = () => {},
totalItems,
itemsShown = 10,
page = 0,
loop = false,
translateWithId: t = translateWithId,
...rest
}) {
const PaginationNav = React.forwardRef(function PaginationNav(
{
className,
onChange = () => {},
totalItems,
itemsShown = 10,
page = 0,
loop = false,
translateWithId: t = translateWithId,
...rest
},
ref
) {
const [currentPage, setCurrentPage] = useState(page);
const [itemsThatFit, setItemsThatFit] = useState(
itemsShown >= 4 ? itemsShown : 4
Expand Down Expand Up @@ -266,7 +269,7 @@ export default function PaginationNav({
const startOffset = itemsThatFit <= 4 && currentPage > 1 ? 0 : 1;

return (
<nav className={classNames} {...rest} aria-label="pagination">
<nav className={classNames} ref={ref} {...rest} aria-label="pagination">
<ul className={`${prefix}--pagination-nav__list`}>
<DirectionButton
direction="backward"
Expand Down Expand Up @@ -353,7 +356,7 @@ export default function PaginationNav({
</div>
</nav>
);
}
});

DirectionButton.propTypes = {
/**
Expand Down Expand Up @@ -460,3 +463,5 @@ PaginationNav.propTypes = {
*/
translateWithId: PropTypes.func,
};

export default PaginationNav;

0 comments on commit 6e0edfb

Please sign in to comment.