discourse/app/assets/stylesheets/common/components/_index.scss
Keegan George d886c55f63
DEV: Reusable post-list component (#30312)
This update adds a  _new_ `<PostList />` component, along with it's child components (`<PostListItem/>` and `<PostListItemDetails />`). This new generic component can be used to show a list of posts.

It can be used like so:
```js
/**
 * A component that renders a list of posts
 *
 * @component PostList
 *
 * @args {Array<Object>} posts - The array of post objects to display
 * @args {Function} fetchMorePosts - A function that fetches more posts. Must return a Promise that resolves to an array of new posts.
 * @args {String} emptyText (optional) - Custom text to display when there are no posts
 * @args {String|Array} additionalItemClasses (optional) - Additional classes to add to each post list item
 * @args {String} titleAriaLabel (optional) - Custom Aria label for the post title
 * 
*/
```
```hbs
<PostList
    @posts={{this.posts}}
    @fetchMorePosts={{this.loadMorePosts}}
    @emptyText={{i18n "custom_identifier.empty"}}
    @additionalItemClasses="custom-class"
 />
```
2024-12-19 09:20:25 -08:00

61 lines
1.6 KiB
SCSS

@import "badges";
@import "banner";
@import "d-breadcrumbs";
@import "d-page-header";
@import "d-stat-tiles";
@import "bookmark-list";
@import "bookmark-modal";
@import "bookmark-menu";
@import "buttons";
@import "d-select";
@import "color-input";
@import "char-counter";
@import "conditional-loading-section";
@import "calendar-date-time-input";
@import "convert-to-public-topic-modal";
@import "d-lightbox";
@import "d-toggle-switch";
@import "date-input";
@import "date-picker";
@import "date-time-input-range";
@import "date-time-input";
@import "file-size-input";
@import "footer-nav";
@import "form-template-field";
@import "group-member-dropdown";
@import "groups-form-membership-fields";
@import "hashtag";
@import "horizontal-overflow-nav";
@import "iframed-html";
@import "ignored-user-list";
@import "keyboard_shortcuts";
@import "more-topics";
@import "navs";
@import "offline-indicator";
@import "pick-files-button";
@import "powered-by-discourse";
@import "relative-time-picker";
@import "add-pm-participants";
@import "download-calendar";
@import "sidebar/edit-navigation-menu/categories-modal";
@import "sidebar/edit-navigation-menu/modal";
@import "sidebar/edit-navigation-menu/tags-modal";
@import "signup-progress-bar";
@import "svg";
@import "tap-tile";
@import "theme-card";
@import "time-input";
@import "time-shortcut-picker";
@import "topic-map";
@import "topic-query-filter";
@import "user-card";
@import "user-info";
@import "user-status-message";
@import "user-status-picker";
@import "user-stream-item";
@import "user-stream";
@import "post-list";
@import "widget-dropdown";
@import "welcome-header";
@import "notifications-tracking";