@gitlab/ui
Version:
GitLab UI Components
34 lines (29 loc) • 2.32 kB
JavaScript
import examples from './examples';
var skeleton_loader = "## Usage\n\nSkeleton loaders are to be used when pages or sections can be progressively populated with content, such as text and images, as they become available. Generally speaking the first batch of content will be the lightest to load and is followed by secondary and tertiary content batches. Each loading step will add in more detail to the page until no skeleton loaders are present anymore. Content should replace skeleton objects immediately when the data is available.\n\nThe skeleton loader component accepts shapes which in return will create a skeleton state with a loading animation. Any skeleton state components should be created with `<gl-skeleton-loader></gl-skeleton-loader>`.\n\n## Progressive Loading\n\nDetermine if progressive loading is available, if it is break apart the skeleton to load data as it becomes readily available. If progessive loading is not available, replace the entire skeleton when the data is available.\n\n\n## Under the hood\n\nSkeleton Loader is a port of [vue-content-loader](https://github.com/egoist/vue-content-loader). Some changes have been made to the code to better suit our codebase, such as removing props and refactoring into a SFC. Please take a look at their documentation and a useful [UI tool](http://danilowoz.com/create-vue-content-loader/) for seeing the code output for `svg` shapes.";
var description = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': skeleton_loader
});
var skeleton_loader_documentation = {
followsDesignSystem: true,
description: description,
examples: examples,
propsInfo: {
width: {
additionalInfo: 'It will be set in the viewbox attr in the <svg />'
},
height: {
additionalInfo: 'It will be set in the viewbox attr in the <svg />'
},
uniqueKey: {
additionalInfo: 'Defaults to unique id'
},
preserveAspectRatio: {
additionalInfo: 'Aspect ratio option of <svg/>'
},
baseUrl: {
additionalInfo: "Required if you're using <base url=\"/\" /> in your <head />. Defaults to an empty string. This prop is common used as: <gl-skeleton-loader :base-url=\"$route.fullPath\" /> which will fill the SVG attribute with the relative path."
}
}
};
export default skeleton_loader_documentation;