Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 4868 - tag management operator UI #4914

Merged
merged 156 commits into from
Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
9884683
feat: add registry file
mikemurray Jan 3, 2019
c1b92f2
feat: add i18n
mikemurray Jan 3, 2019
15e7238
feat: add tag query
mikemurray Jan 3, 2019
346422a
feat: add tag mutations
mikemurray Jan 3, 2019
a5337ea
feat: add hoc to get opaque shop id
mikemurray Jan 3, 2019
83db097
feat: add tag table column component
mikemurray Jan 3, 2019
7c3a683
feat: add tag data table
mikemurray Jan 3, 2019
cea84a1
feat: add tag settings
mikemurray Jan 3, 2019
d6e64b3
feat: register components
mikemurray Jan 3, 2019
50594e9
Merge branch 'develop' into feat-4868-mikemurray-tag-mutations
mikemurray Jan 3, 2019
dd6234f
fix: import path
mikemurray Jan 3, 2019
8679bb1
fix: component name
mikemurray Jan 3, 2019
815897c
feat: add addTag mutation
mikemurray Jan 4, 2019
19ec47c
feat: addTag mutation test
mikemurray Jan 4, 2019
0fae865
feat: add removeTag mutation
mikemurray Jan 4, 2019
2855343
feat: add removeTag mutation test
mikemurray Jan 4, 2019
0b5e694
feat: add updateTag mutation
mikemurray Jan 4, 2019
22eb44f
feat: add updateTag mutation test
mikemurray Jan 4, 2019
4790fb1
feat: add mutation functions index
mikemurray Jan 4, 2019
69d5341
feat: add addTag mutation resolver
mikemurray Jan 4, 2019
331fb8c
feat: add addTag mutation resolver test
mikemurray Jan 4, 2019
69be213
feat: add removeTag mutation resolver
mikemurray Jan 4, 2019
8036d64
feat: add removeTag mutation resolver test
mikemurray Jan 4, 2019
3b5452c
feat: add updateTag mutation resolver
mikemurray Jan 4, 2019
beb32ba
feat: add updateTag mutation resolver test
mikemurray Jan 4, 2019
1b5514c
feat: add mutation resolver index
mikemurray Jan 4, 2019
984ebdf
feat: add resolvers index
mikemurray Jan 4, 2019
a736bc4
feat: add tag schema for mutations
mikemurray Jan 4, 2019
d5c0a43
feat: add GraphQL config
mikemurray Jan 4, 2019
f32268f
refactor: rename property name to better match selected data
mikemurray Jan 4, 2019
0727a3d
refactor: update names to tag
mikemurray Jan 4, 2019
1e0b248
fix: update names for mutations for tags
mikemurray Jan 4, 2019
079e286
feat: add fragments file with common tag fields
mikemurray Jan 4, 2019
dd54855
refactor: use tag fragment
mikemurray Jan 4, 2019
e307e1a
refactor: use tag fragment
mikemurray Jan 4, 2019
3f79e9e
fix: add shopId to update and remove input schemas
mikemurray Jan 4, 2019
c95cd41
fix: use correct tag fields
mikemurray Jan 4, 2019
45ba952
refactor: update field order
mikemurray Jan 4, 2019
4350626
fix: use correct tag fields
mikemurray Jan 4, 2019
9646163
feat: slugify the tag name
mikemurray Jan 4, 2019
68a67da
fix: update required fields
mikemurray Jan 4, 2019
86a7049
fix: default value to false
mikemurray Jan 4, 2019
8dbd472
feat: add query to get a single tag
mikemurray Jan 7, 2019
79e6785
feat: add TagForm component
mikemurray Jan 7, 2019
7891d2d
refactor: remove the tag form component
mikemurray Jan 7, 2019
d6a2ce0
feat: add page for creating and editing tags
mikemurray Jan 7, 2019
832f728
feat: register operator routes for creating and editing tag pages
mikemurray Jan 7, 2019
6d65915
fix: use padding instead of negative margins
mikemurray Jan 7, 2019
a9e7d29
fix: set the width of the container to the viewport width
mikemurray Jan 7, 2019
d244f02
fix: remove the drawer width
mikemurray Jan 7, 2019
ad168e2
fix: increase drawer width to match designs
mikemurray Jan 7, 2019
8b74694
feat: add display title placeholder translation
mikemurray Jan 7, 2019
a26589f
fix: display title translation
mikemurray Jan 7, 2019
2e788c6
feat: add isVisible translation
mikemurray Jan 7, 2019
84f67e8
fix: use translation for display title
mikemurray Jan 7, 2019
b8daf9b
fix: visible checkbox names and translation
mikemurray Jan 7, 2019
aa60e32
feat: add mui theme
mikemurray Jan 8, 2019
adfb278
feat: add the mui theme provider
mikemurray Jan 8, 2019
3668aad
feat: add tag toolbar component
mikemurray Jan 8, 2019
f9e6d3b
feat: add toolbar
mikemurray Jan 8, 2019
e82a2ff
feat: add translations for tabs
mikemurray Jan 8, 2019
93cb601
feat: add tabs to break up the form
mikemurray Jan 8, 2019
6de262e
feat: update theme
mikemurray Jan 8, 2019
9ba078c
fix: adjust spacing
mikemurray Jan 8, 2019
328f285
Update en.json
mikemurray Jan 9, 2019
4fd174c
feat: add slug field
mikemurray Jan 9, 2019
19f5104
feat: add save button translation
mikemurray Jan 9, 2019
0b6ba3e
feat: add save button below the form
mikemurray Jan 9, 2019
d0f86dd
feat: add media uploader
mikemurray Jan 9, 2019
c8ffd0a
feat: add metafield fields
mikemurray Jan 9, 2019
1cdd81b
feat: add support for metafields to mutations
mikemurray Jan 9, 2019
216b3dc
fix: fix small font size on html tag
mikemurray Jan 10, 2019
c3c5d9a
fix: adjust font weights
mikemurray Jan 10, 2019
459ddd4
feat: add query for products by tag id
mikemurray Jan 10, 2019
1db2192
refactor: remove unused Fragment
mikemurray Jan 10, 2019
82c29bb
feat: add gql query for products by tag id
mikemurray Jan 10, 2019
86c2718
feat: add query function to find products by tag id
mikemurray Jan 10, 2019
837ba3e
feat: add products by tag query
mikemurray Jan 10, 2019
99356b0
feat: add products by tag query resolver
mikemurray Jan 10, 2019
d3449a3
feat: register queries
mikemurray Jan 10, 2019
c6363b4
refactor: moving toolbar to TagForm component
mikemurray Jan 10, 2019
22161ce
feat: add tag product table
mikemurray Jan 10, 2019
b867169
feat: add toolbar
mikemurray Jan 10, 2019
8e27de5
feat: add tag product table
mikemurray Jan 10, 2019
db18544
fix: remove products prop
mikemurray Jan 10, 2019
e47d281
feat: update translations
mikemurray Jan 10, 2019
957c795
refactor: use mui divider
mikemurray Jan 10, 2019
92dac9b
fix: disable card action spacing
mikemurray Jan 10, 2019
83694e7
fix: import divider
mikemurray Jan 10, 2019
133a008
feat: add featuredProductIds
mikemurray Jan 11, 2019
46f94e8
feat: add featuredProductIds to tag schema
mikemurray Jan 11, 2019
ca2fcc1
feat: add utils to paginate mongo aggregations
mikemurray Jan 11, 2019
bfec57c
feat: update order of products
mikemurray Jan 11, 2019
6d6f701
feat: display position
mikemurray Jan 11, 2019
df1f914
feat: add position field
mikemurray Jan 11, 2019
195d8f7
feat: update featuredProductIds
mikemurray Jan 11, 2019
6b7f27c
feat: create the start of a mongo aggregation
mikemurray Jan 11, 2019
f69522b
feat: paginate a mongo aggregation
mikemurray Jan 11, 2019
15b7681
feat: add position to schema
mikemurray Jan 11, 2019
03df5c8
Merge branch 'develop' into feat-4868-mikemurray-tag-mutations
mikemurray Jan 11, 2019
7de981b
fix: show invisible tags
mikemurray Jan 11, 2019
935740e
fix: throw a descriptive error if the tag isn't found
mikemurray Jan 11, 2019
6272fdc
feat: add status translations
mikemurray Jan 11, 2019
17eb93b
feat: add custom status column
mikemurray Jan 11, 2019
59fc651
fix: only display values 0 or above
mikemurray Jan 11, 2019
da0b985
fix: prevent products with a null priority from being featured
mikemurray Jan 11, 2019
a46f08b
fix: update translations
mikemurray Jan 14, 2019
629a4c6
fix: setting featured product ids
mikemurray Jan 14, 2019
80299e0
fix: hide product ordering tab for new tag creation
mikemurray Jan 14, 2019
25d1a87
fix: update translation
mikemurray Jan 14, 2019
0a83e09
fix: remove tag name help text
mikemurray Jan 14, 2019
e70705b
feat: redirect to edit tag on creation
mikemurray Jan 14, 2019
930fc0f
fix: hero media border color
mikemurray Jan 15, 2019
8f1ac42
feat: add hero media url translations
mikemurray Jan 15, 2019
ea43767
feat: add heroMediaUrl url to query
mikemurray Jan 15, 2019
33333ca
feat: add hero media url field
mikemurray Jan 15, 2019
5553f3a
feat: add theme definition for small hero image preview
mikemurray Jan 15, 2019
bd0dd2f
feat: add hero image column
mikemurray Jan 15, 2019
2973300
fix: hero media column data name and size
mikemurray Jan 15, 2019
4027f0f
refactor: move tag settings component to pages
mikemurray Jan 15, 2019
22c73ed
refactor: use mui card component
mikemurray Jan 15, 2019
b573fa3
fix: pagination
mikemurray Jan 15, 2019
679044d
fix: update translations
mikemurray Jan 15, 2019
d15ec0d
fix: left align create button
mikemurray Jan 15, 2019
150ae01
fix: update translation key
mikemurray Jan 15, 2019
c102705
feat: add translations
mikemurray Jan 15, 2019
b7fb3f1
feat: add title for display title and slug field group
mikemurray Jan 15, 2019
e5a2b32
fix: prevent blank meta fields from being saved
mikemurray Jan 15, 2019
8928987
refactor: return tag not wrapped in an object
mikemurray Jan 17, 2019
a93491d
test: update addTag test
mikemurray Jan 17, 2019
8f9523a
fix: remove wasRemoved
mikemurray Jan 17, 2019
a8c65f9
test: update removeTag mutation resolver test
mikemurray Jan 17, 2019
53c1bbc
feat: add heroMediaUrl field and validation
mikemurray Jan 17, 2019
96e2774
fix: return tag not wrapped in an object
mikemurray Jan 17, 2019
f448aa1
test: update updateTag mutation resolver test
mikemurray Jan 17, 2019
7b5256b
feat: add SetTagHeroMediaInput mutation to schema
mikemurray Jan 17, 2019
8bbf75e
feat: add setTagHeroMedia mutation
mikemurray Jan 17, 2019
9d65d2b
feat: update translations
mikemurray Jan 17, 2019
97e09ec
test: fix test
mikemurray Jan 17, 2019
7222f6b
test: fix broken test
mikemurray Jan 17, 2019
8e18ac9
test: fix test
mikemurray Jan 17, 2019
6e363d4
test: fix test
mikemurray Jan 17, 2019
c1cd0ad
feat: remove hero media if fileRecord is null
mikemurray Jan 17, 2019
c9ee34c
feat: add hero media mutation
mikemurray Jan 17, 2019
9573d18
feat: hero media upload and delete
mikemurray Jan 17, 2019
46c20f2
fix: add tag test
mikemurray Jan 17, 2019
020fd76
test: add snapshots
mikemurray Jan 17, 2019
4c8c2e2
fix: remove unused imports
mikemurray Jan 17, 2019
fd00dca
fix: prevent null values from displaying in priority input
mikemurray Jan 17, 2019
32f8709
refactor: use font family from a variable
mikemurray Jan 17, 2019
b837603
fix: remove title
mikemurray Jan 17, 2019
2d04bcc
feat: show uploaded image preview
mikemurray Jan 17, 2019
587ee20
Merge remote-tracking branch 'origin/develop' into feat-4868-mikemurr…
mikemurray Jan 17, 2019
f46eb88
fix: use currect type
mikemurray Jan 17, 2019
a2f20e5
fix: don't show null values, but do allow 0 or greater
mikemurray Jan 17, 2019
91e45f0
fix: namespace mispelling
mikemurray Jan 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions imports/client/ui/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
import { Translation } from "/imports/plugins/core/ui/client/components";

const Drawer = styledMUI(MUIDrawer, { paper: "Paper" })`
width: ${applyTheme("Sidebar.drawerWidth")};
flex-shrink: 0;
.Paper {
width: ${applyTheme("Sidebar.drawerWidth")};
}
Expand Down
16 changes: 12 additions & 4 deletions imports/client/ui/layouts/Dashboard.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import styled, { css } from "styled-components";
import styled, { css, injectGlobal } from "styled-components";
import styledMUI from "styled-components-mui";
import { ContainerQuery } from "react-container-query";
import MUIAppBar from "@material-ui/core/AppBar";
Expand All @@ -20,6 +20,13 @@ const query = {
}
};

// Remove the 10px fontSize from the html element as it affects fonts that rely on rem
injectGlobal`
html {
font-size: inherit;
}
`;

const Container = styled.div`
display: flex;
`;
Expand All @@ -29,13 +36,14 @@ const Container = styled.div`
// for DOM elements and prints warnings in the console. Someday there may be a better solution.
// See https://github.com/styled-components/styled-components/issues/305
const Main = styled(({ children, isMobile, isSidebarOpen, ...divProps }) => (<div {...divProps}>{children}</div>))`
width: 100vw;
background-color: ${applyTheme("Layout.pageBackgroundColor")};
flex-grow: 1;
transition: ${(props) =>
(props.isSidebarOpen && props.isMobile !== true
? "margin 225ms cubic-bezier(0, 0, 0.2, 1) 0ms"
: "margin 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms")};
margin-left: ${(props) => (!props.isSidebarOpen && props.isMobile === false ? "-264px" : 0)};
? "padding 225ms cubic-bezier(0, 0, 0.2, 1) 0ms"
: "padding 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms")};
padding-left: ${(props) => (props.isSidebarOpen && props.isMobile === false ? "280px" : 0)};
`;

const MainContent = styled.div`
Expand Down
7 changes: 6 additions & 1 deletion imports/collections/schemas/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ export const Tag = new SimpleSchema({
"displayTitle": {
type: String,
optional: true
}
},
"featuredProductIds": {
type: Array,
optional: true
},
"featuredProductIds.$": String
});

registerSchema("Tag", Tag);
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ type Tag implements Node & Deletable {

"A string of the title to be displayed on a Tag Listing Page"
displayTitle: String


"A list of the IDs of top products in this tag"
featuredProductIds: [ID]
}

"The fields by which you are allowed to sort any query that returns a `TagConnection`"
Expand Down Expand Up @@ -78,7 +80,7 @@ extend type Query {
tag(
"Slug or ID of Tag"
slugOrId: String,

"Set to true if you want to include tags that have isVisible set to false"
shouldIncludeInvisible: Boolean = false
): Tag
Expand Down
21 changes: 21 additions & 0 deletions imports/plugins/core/graphql/lib/hocs/withOpaqueShopId.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { composeWithTracker } from "@reactioncommerce/reaction-components";
import { Reaction } from "/client/api";
import Logger from "/client/modules/logger";
import getOpaqueIds from "/imports/plugins/core/core/client/util/getOpaqueIds";

const composer = (props, onData) => {
const shopId = Reaction.getShopId();

getOpaqueIds([{ namespace: "Shop", id: shopId }])
.then(([opaqueShopId]) => {
onData(null, {
shopId: opaqueShopId
});
return null;
})
.catch((error) => {
Logger.error(error);
});
};

export default composeWithTracker(composer);
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
const DEFAULT_LIMIT = 20;

/**
* Inspired by https://www.reindex.io/blog/relay-graphql-pagination-with-mongodb/
* @name applyPaginationToMongoAggregation
* @method
* @memberof GraphQL/ResolverUtilities
* @summary Adds `skip` and `limit` to a MongoDB Aggregation as necessary, based on GraphQL
* `first` and `last` params
* @param {Object} aggregationParams An object containing the collection and aggregation pipeline
* @param {MongoCollection} [aggregationParams.collection] - Mongo collection is run the aggregation on
* @param {Array} [aggregationParams.pipeline] - Mongo aggregation pipeline array
* @param {Object} args GraphQL query arguments
* @param {Number} totalCount Total count of docs that match the query, after applying the before/after filter
* @return {Promise<Object>} `{ pageInfo }`
*/
export default async function applyPaginationToMongoAggregation(aggregationParams, { first, last } = {}, totalCount) {
const { collection, pipeline } = aggregationParams;

if (first && last) throw new Error("Request either `first` or `last` but not both");

// Enforce a `first: 20` limit if no user-supplied limit, using the DEFAULT_LIMIT
const limit = first || last || DEFAULT_LIMIT;

let skip = 0;
if (last && totalCount > last) skip = totalCount - last;

let hasNextPage = null;
let hasPreviousPage = null;
if (last) {
if (skip === 0) {
hasPreviousPage = false;
} else {
// For backward pagination, we can find out whether there is a previous page here, but we can't
// find out whether there's a next page because the cursor has already had "before" filtering
// added. Code external to this function will need to determine whether there are any documents
// after that "before" ID.

const facet = {
$facet: {
nodes: [
{ $limit: limit + 1 },
{ $skip: skip - 1 }
]
}
};

const result = await collection.aggregate([...pipeline, facet]).toArray();
const { nodes } = (result && result[0]) || { nodes: [] };
hasPreviousPage = nodes.length > limit;
}
} else {
// For forward pagination, we can find out whether there is a next page here, but we can't
// find out whether there's a previous page because the cursor has already had "after" filtering
// added. Code external to this function will need to determine whether there are any documents
// before that "after" ID.
const facet = {
$facet: {
nodes: [
{ $limit: limit + 1 }
]
}
};

const result = await collection.aggregate([...pipeline, facet]).toArray();
const { nodes } = (result && result[0]) || { nodes: [] };
hasNextPage = nodes.length > limit;
}

// Now apply actual limit + skip
const facet = {
$facet: {
nodes: [
{ $limit: limit },
{ $skip: skip || 0 }
],
pageInfo: [
{ $count: "totalCount" }
]
}
};

const results = await collection.aggregate([...pipeline, facet]).toArray();

return {
hasNextPage,
hasPreviousPage,
results
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import applyPaginationToMongoAggregation from "./applyPaginationToMongoAggregation";

/**
* Resolvers that return multiple documents in the form of a connection should construct a
* MongoDB query, pass that cursor to this function, and then return the result.
*
* @name getPaginatedResponse
* @method
* @memberof GraphQL/ResolverUtilities
* @summary Given a MongoDB cursor, adds skip, limit, sort, and other filters as necessary
* based on GraphQL resolver arguments.
* @param {Object} aggregationParams An object containing the collection and aggregation pipeline
* @param {MongoCollection} [aggregationParams.collection] - Mongo collection is run the aggregation on
* @param {Array} [aggregationParams.pipeline] - Mongo aggregation pipeline array
* @param {Object} args Connection arguments from GraphQL query
* @return {Promise<Object>} `{ nodes, pageInfo, totalCount }`
*/
export default async function getPaginatedAggregateResponse(aggregationParams, args) {
const totalCountAfterOrBefore = 0;
const { results, hasPreviousPage, hasNextPage } = await applyPaginationToMongoAggregation(aggregationParams, args, totalCountAfterOrBefore);
const { nodes, pageInfo: { totalCount } } = results[0];

// Figure out proper hasNext/hasPrevious
const pageInfo = {
hasPreviousPage: hasPreviousPage || false,
hasNextPage: hasNextPage || false
};

const count = nodes.length;
if (count) {
pageInfo.startCursor = nodes[0]._id;
pageInfo.endCursor = nodes[count - 1]._id;
}

return { nodes, pageInfo, totalCount };
}
2 changes: 2 additions & 0 deletions imports/plugins/core/graphql/server/no-meteor/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

export { default as applyPaginationToMongoCursor } from "./applyPaginationToMongoCursor";
export { default as applyPaginationToMongoAggregation } from "./applyPaginationToMongoAggregation";
export { default as getConnectionTypeResolvers } from "./getConnectionTypeResolvers";
export { default as getPaginatedAggregateResponse } from "./getPaginatedAggregateResponse";
export { default as getPaginatedResponse } from "./getPaginatedResponse";
export { default as namespaces } from "./namespaces";
export { default as optimizeIdOnly } from "./optimizeIdOnly";
Expand Down
6 changes: 5 additions & 1 deletion imports/plugins/core/router/client/browserRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from "react";
import PropTypes from "prop-types";
import ReactDOM from "react-dom";
import { ThemeProvider } from "styled-components";
import MuiThemeProvider from "@material-ui/core/styles/MuiThemeProvider";
import { matchPath } from "react-router";
import { Router as ReactRouter } from "react-router-dom";
import { ApolloProvider } from "react-apollo";
Expand All @@ -19,6 +20,7 @@ import { MetaData } from "/lib/api/router/metadata";
import { Router } from "../lib";
import appComponents from "./appComponents";
import theme from "./theme";
import muiTheme from "./theme/muiTheme";

const { history } = Router;

Expand Down Expand Up @@ -178,7 +180,9 @@ export function initBrowserRouter() {
<TranslationProvider>
<ComponentsProvider value={appComponents}>
<ThemeProvider theme={theme}>
<Components.App children={Router.reactComponents} />
<MuiThemeProvider theme={muiTheme}>
<Components.App children={Router.reactComponents} />
</MuiThemeProvider>
</ThemeProvider>
</ComponentsProvider>
</TranslationProvider>
Expand Down
9 changes: 8 additions & 1 deletion imports/plugins/core/router/client/theme/defaultTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const rui_components = {
companyNameColor: colors.reactionBlue,
companyNameBorderBottom: colors.reactionBlue200,
dividerHeight: "20px",
drawerWidth: "264px",
drawerWidth: "280px",
iconBarWidth,
iconColor: colors.coolGrey300,
listItemIconFontSize: "20px",
Expand All @@ -74,6 +74,13 @@ const rui_components = {
${colors.coolGrey100} ${iconBarWidth},
${colors.coolGrey100} 100%
)`
},
MediaUploader: {
backgroundColor: colors.black02,
border: `1px solid ${colors.black20}`
},
HeroMediaSmall: {
border: `1px solid ${colors.reactionBlue}`
}
};

Expand Down
75 changes: 75 additions & 0 deletions imports/plugins/core/router/client/theme/muiTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { defaultComponentTheme } from "@reactioncommerce/components";
import createMuiTheme from "@material-ui/core/styles/createMuiTheme";
import colors from "./colors";

const { rui_typography: typography } = defaultComponentTheme;

export const rawMuiTheme = {
palette: {
primary: {
light: colors.coolGrey300,
main: colors.coolGrey,
dark: colors.coolGrey400
},
secondary: {
light: colors.coolGrey300,
main: colors.coolGrey,
dark: colors.coolGrey400
}
},
typography: {
fontFamily: typography.bodyText.fontFamily,
fontWeightLight: 400,
fontWeightRegular: 400,
fontWeightMedium: 500,
useNextVariants: true
},
shadows: [
"none",
"0px 2px 2px 0px rgba(0,0,0,0.05)",
"0px 3px 6px 0px rgba(0,0,0,0.05)",
"0px 5px 10px 0 rgba(0,0,0,0.05);",
"0px 8px 16px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);",
"0px 13px 26px 0 rgba(0,0,0,0.05);"
],
// Override default props
props: {
MuiAppBar: {
elevation: 3
}
},
// Override defined theme properties
overrides: {
MuiAppBar: {
colorDefault: {
backgroundColor: colors.white
}
},
MuiCard: {
root: {
border: `1px solid ${colors.black10}`
}
}
}
};

export default createMuiTheme(rawMuiTheme);
Loading