-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d77cd5e
commit dc1d591
Showing
16 changed files
with
148 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 22 additions & 13 deletions
35
src/components/ContentHighlights/ContentHighlightsCardItemsContainer.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/components/ContentHighlights/SkeletonContentCardContainer.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import PropTypes from 'prop-types'; | ||
import { CardGrid } from '@edx/paragon'; | ||
import SkeletonContentCard from './SkeletonContentCard'; | ||
import { HIGHLIGHTS_CARD_GRID_COLUMN_SIZES } from './data/constants'; | ||
|
||
const SkeletonContentCardContainer = ({ length, columnSizes }) => ( | ||
<CardGrid columnSizes={columnSizes}> | ||
{[ | ||
...new Array(length), | ||
// eslint-disable-next-line react/no-array-index-key | ||
].map((_, index) => <SkeletonContentCard key={index} />)}; | ||
</CardGrid> | ||
); | ||
|
||
SkeletonContentCardContainer.propTypes = { | ||
length: PropTypes.number.isRequired, | ||
columnSizes: PropTypes.shape({ | ||
xs: PropTypes.number, | ||
md: PropTypes.number, | ||
lg: PropTypes.number, | ||
xl: PropTypes.number, | ||
}), | ||
}; | ||
|
||
SkeletonContentCardContainer.defaultProps = { | ||
columnSizes: HIGHLIGHTS_CARD_GRID_COLUMN_SIZES, | ||
}; | ||
|
||
export default SkeletonContentCardContainer; |
Oops, something went wrong.