-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-rating-indicator): provide the possibility to set size of th…
…e icons (#10406)
- Loading branch information
1 parent
5af40ae
commit a01eccb
Showing
10 changed files
with
121 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Types of icon sizes used in the RatingIndicator. | ||
* Provides predefined size categories to ensure consistent scaling and spacing of icons. | ||
* @public | ||
* @since 2.6.0 | ||
*/ | ||
enum RatingIndicatorSize { | ||
/** | ||
* Small size for compact layouts. | ||
* @public | ||
*/ | ||
S = "S", | ||
|
||
/** | ||
* Medium size, used as the default option. | ||
* Offers a balanced appearance for most scenarios. | ||
* @public | ||
*/ | ||
M = "M", | ||
|
||
/** | ||
* Large size for prominent or spacious layouts. | ||
* @public | ||
*/ | ||
L = "L", | ||
} | ||
|
||
export default RatingIndicatorSize; |
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
4 changes: 4 additions & 0 deletions
4
packages/website/docs/_samples/main/RatingIndicator/Sizes/Sizes.md
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,4 @@ | ||
import html from '!!raw-loader!./sample.html'; | ||
import js from '!!raw-loader!./main.js'; | ||
|
||
<Editor html={html} js={js} /> |
1 change: 1 addition & 0 deletions
1
packages/website/docs/_samples/main/RatingIndicator/Sizes/main.js
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 @@ | ||
import "@ui5/webcomponents/dist/RatingIndicator.js"; |
21 changes: 21 additions & 0 deletions
21
packages/website/docs/_samples/main/RatingIndicator/Sizes/sample.html
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,21 @@ | ||
<!-- playground-hide --> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Sample</title> | ||
</head> | ||
|
||
<body style="background-color: var(--sapBackgroundColor)"> | ||
<!-- playground-hide-end --> | ||
<ui5-rating-indicator Size="S" value="2.5" readonly></ui5-rating-indicator></br> | ||
<ui5-rating-indicator size="M"></ui5-rating-indicator></br> | ||
<ui5-rating-indicator size="L" value="3" disabled></ui5-rating-indicator> | ||
<!-- playground-hide --> | ||
<script type="module" src="main.js"></script> | ||
</body> | ||
|
||
</html> | ||
<!-- playground-hide-end --> |