-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(segment): improves loading of the component and solves nested ele…
…mnts sizing issue (#2358) * fix(segment): improves loading of the component and solves nested size issues
- Loading branch information
Showing
6 changed files
with
151 additions
and
65 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
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,80 @@ | ||
<!DOCTYPE html> | ||
<html dir="ltr" lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Segment Buttons</title> | ||
|
||
<script type="module" src="build/scale-components.esm.js"></script> | ||
<script nomodule src="build/scale-components.js"></script> | ||
<link rel="stylesheet" href="build/scale-components.css" /> | ||
<style> | ||
section { | ||
padding: 1rem; | ||
} | ||
|
||
.bg-black { | ||
background: black; | ||
color: white; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<scale-collapsible> | ||
<div slot="heading">Open Me for Disaster</div> | ||
<scale-segmented-button> | ||
<scale-segment selected>Apple</scale-segment> | ||
<scale-segment>One+</scale-segment> | ||
<scale-segment>Samsung</scale-segment> | ||
<scale-segment>Huawei</scale-segment> | ||
</scale-segmented-button> | ||
</scale-collapsible> | ||
<div style="height: 20px"></div> | ||
<scale-segmented-button> | ||
<scale-segment>Apple</scale-segment> | ||
<scale-segment>One+</scale-segment> | ||
<scale-segment>Samsung</scale-segment> | ||
<scale-segment>Huawei</scale-segment> | ||
</scale-segmented-button> | ||
<div style="height: 20px"></div> | ||
<scale-segmented-button> | ||
<scale-segment selected>Label</scale-segment> | ||
<scale-segment selected>Label</scale-segment> | ||
</scale-segmented-button> | ||
<div style="height: 20px"></div> | ||
<scale-segmented-button invalid> | ||
<scale-segment> | ||
<scale-icon-device-device-phone slot="segment-icon"> | ||
</scale-icon-device-device-phone> | ||
Apple | ||
</scale-segment> | ||
<scale-segment> | ||
<scale-icon-device-device-phone slot="segment-icon"> | ||
</scale-icon-device-device-phone> | ||
One+ | ||
</scale-segment> | ||
<scale-segment> | ||
<scale-icon-device-device-phone slot="segment-icon"> | ||
</scale-icon-device-device-phone> | ||
Samsung | ||
</scale-segment> | ||
<scale-segment> | ||
<scale-icon-device-device-phone slot="segment-icon"> | ||
</scale-icon-device-device-phone> | ||
Huawei | ||
</scale-segment> | ||
</scale-segmented-button> | ||
<div style="height: 20px"></div> | ||
|
||
<scale-segmented-button multi-select> | ||
<scale-segment selected>Apple</scale-segment> | ||
<scale-segment selected>One+</scale-segment> | ||
<scale-segment>Samsung</scale-segment> | ||
<scale-segment>Huawei</scale-segment> | ||
</scale-segmented-button> | ||
</body> | ||
</html> |