Skip to content

Commit

Permalink
feat: add widthModalExtraLarge token (#2592)
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 15, 2020
1 parent 05f1960 commit 5213c49
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
5 changes: 2 additions & 3 deletions packages/orbit-components/src/Modal/index.js
Expand Up @@ -25,12 +25,11 @@ import type { Instance, Props } from "./index";

const getSizeToken = () => ({ size, theme }) => {
const tokens = {
// TODO: create tokens widthModalSmall,...
[SIZES.EXTRASMALL]: "360px",
[SIZES.SMALL]: theme.orbit.widthModalSmall,
[SIZES.NORMAL]: theme.orbit.widthModalNormal,
[SIZES.LARGE]: "900px",
[SIZES.EXTRALARGE]: theme.orbit.widthModalLarge, // add token theme.orbit.widthModalExtraLarge
[SIZES.LARGE]: theme.orbit.widthModalLarge,
[SIZES.EXTRALARGE]: theme.orbit.widthModalExtraLarge,
};

return tokens[size];
Expand Down
Expand Up @@ -465,7 +465,8 @@ Object {
"widthIconLarge": "32px",
"widthIconMedium": "24px",
"widthIconSmall": "16px",
"widthModalLarge": "1280px",
"widthModalExtraLarge": "1280px",
"widthModalLarge": "900px",
"widthModalNormal": "740px",
"widthModalSmall": "540px",
"widthRadioButton": "20px",
Expand Down Expand Up @@ -943,7 +944,8 @@ Object {
"widthIconLarge": "32px",
"widthIconMedium": "24px",
"widthIconSmall": "16px",
"widthModalLarge": "1280px",
"widthModalExtraLarge": "1280px",
"widthModalLarge": "900px",
"widthModalNormal": "740px",
"widthModalSmall": "540px",
"widthRadioButton": "20px",
Expand Down Expand Up @@ -1421,7 +1423,8 @@ Object {
"widthIconLarge": "3px",
"widthIconMedium": "2px",
"widthIconSmall": "1px",
"widthModalLarge": "1280px",
"widthModalExtraLarge": "1280px",
"widthModalLarge": "900px",
"widthModalNormal": "740px",
"widthModalSmall": "540px",
"widthRadioButton": "20px",
Expand Down Expand Up @@ -1899,7 +1902,8 @@ Object {
"widthIconLarge": "32px",
"widthIconMedium": "24px",
"widthIconSmall": "16px",
"widthModalLarge": "1280px",
"widthModalExtraLarge": "1280px",
"widthModalLarge": "900px",
"widthModalNormal": "740px",
"widthModalSmall": "540px",
"widthRadioButton": "20px",
Expand Down
1 change: 1 addition & 0 deletions packages/orbit-design-tokens/src/index.d.ts
Expand Up @@ -364,6 +364,7 @@ export type Tokens = {
widthModalSmall: string;
widthModalNormal: string;
widthModalLarge: string;
widthModalExtraLarge: string;
widthStopoverArrow: string;
heightStopoverArrow: string;
widthBreakpointMediumMobile: number;
Expand Down
3 changes: 2 additions & 1 deletion packages/orbit-design-tokens/src/index.js
Expand Up @@ -286,7 +286,8 @@ export const getTokens: GetTokens = customFoundation => {
heightInputGroupSeparatorNormal: theme.base.sizeMd,
widthModalSmall: "540px",
widthModalNormal: "740px",
widthModalLarge: "1280px",
widthModalLarge: "900px",
widthModalExtraLarge: "1280px",
widthStopoverArrow: "36px",
heightStopoverArrow: "7px",
// category:Breakpoints
Expand Down
1 change: 1 addition & 0 deletions packages/orbit-design-tokens/src/index.js.flow
Expand Up @@ -263,6 +263,7 @@ export type Tokens = {|
widthModalSmall: string,
widthModalNormal: string,
widthModalLarge: string,
widthModalExtraLarge: string,
widthStopoverArrow: string,
heightStopoverArrow: string,
widthBreakpointMediumMobile: number,
Expand Down

0 comments on commit 5213c49

Please sign in to comment.