@gitlab/ui
Version:
GitLab UI Components
23 lines (19 loc) • 898 B
JavaScript
import examples from './examples';
var description = "# Truncate\n\nThe `GlTruncate` component lets you truncate the long texts with ellipsis.\n\n<!-- STORY -->\n\n> **Tip:** Try resizing the side panel for truncation.\n\n## Usage\n\n```html\n<gl-truncate :text=\"text\" :position=\"position\" />\n```\n\nBy default, the ellipsis position is at the `end`.\n\nPro Tip: Truncating long filepaths from the `middle` / `start` can help preventing the important\ninformation in the end, i.e. filenames.\n";
var truncate_documentation = {
description,
examples,
propsInfo: {
text: {
additionalInfo: 'Text to be ellipsized'
},
position: {
additionalInfo: 'Ellipsis position',
enum: 'truncateOptions'
},
withTooltip: {
additionalInfo: 'Display the full text in a tooltip only if it is being truncated'
}
}
};
export default truncate_documentation;