Skip to content

Commit 396b9ad

Browse files
committed
feat(ui-overlays): add a 'regular' size tray option
refs: INSTUI-1700 to better align with design there was a need for a size that fell between the existing small and medium, so regular has been introduced TEST PLAN: - ensure the 'regular' size option works within the examples - ensure the original x-small, small, medium and large sizes all work as before Change-Id: I6585234e3980c1657b44401ca97788816de012e6 Reviewed-on: https://gerrit.instructure.com/175755 Tested-by: Jenkins Reviewed-by: Steve Jensen <sejensen@instructure.com> QA-Review: Daniel Sasaki <dsasaki@instructure.com> Product-Review: Kyle Follett <kfollett@instructure.com>
1 parent 68eb293 commit 396b9ad

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

packages/ui-overlays/src/components/Tray/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class Example extends React.Component {
5252
const sizeVariants = [
5353
{value: 'x-small', label: 'Extra Small'},
5454
{value: 'small', label: 'Small'},
55+
{value: 'regular', label: 'Regular'},
5556
{value: 'medium', label: 'Medium'},
5657
{value: 'large', label: 'Large'}
5758
]

packages/ui-overlays/src/components/Tray/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class Tray extends Component {
8181
/*
8282
* The size (width) of the `<Tray />` when placement is `start` or `end`
8383
*/
84-
size: PropTypes.oneOf(['x-small', 'small', 'medium', 'large']),
84+
size: PropTypes.oneOf(['x-small', 'small', 'regular', 'medium', 'large']),
8585

8686
/**
8787
* Placement to determine where the `<Tray />` should display in the viewport

packages/ui-overlays/src/components/Tray/styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
width: var(--smallWidth);
3939
}
4040

41+
&.regular {
42+
width: var(--regularWidth);
43+
}
44+
4145
&.medium {
4246
width: var(--mediumWidth);
4347
}

packages/ui-overlays/src/components/Tray/theme.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default function ({ colors, breakpoints, shadows, stacking, borders }) {
3232
boxShadow: shadows.depth3,
3333
xSmallWidth: breakpoints.xSmall,
3434
smallWidth: '20em', // 368px
35+
regularWidth: breakpoints.small,
3536
mediumWidth: breakpoints.medium,
3637
largeWidth: breakpoints.large,
3738
zIndex: stacking.topmost

0 commit comments

Comments
 (0)