Merge branch 'master' of github.com:trouble/payload into typescript/datePicker

This commit is contained in:
Jarrod Flesch
2020-12-29 12:48:24 -05:00
22 changed files with 400 additions and 57 deletions

View File

@@ -124,3 +124,5 @@ dialog {
.payload__modal-item--enterDone {
z-index: $z-modal;
}
@import '~payload-user-css';

View File

@@ -0,0 +1 @@
/* Used as a placeholder for when the Payload app does not have custom CSS */

View File

@@ -0,0 +1 @@
/* Used as a placeholder for when the Payload app does not have custom SCSS */

View File

@@ -14,6 +14,8 @@ export const defaults = {
disable: false,
indexHTML: path.resolve(__dirname, '../admin/index.html'),
components: {},
css: path.resolve(__dirname, '../admin/scss/custom.css'),
scss: path.resolve(__dirname, '../admin/scss/overrides.scss'),
},
upload: {},
email: {
@@ -44,7 +46,4 @@ export const defaults = {
},
hooks: {},
localization: false,
paths: {
scss: path.resolve(__dirname, '../admin/scss/overrides.scss'),
},
};

View File

@@ -31,6 +31,8 @@ export default joi.object({
}),
disable: joi.bool(),
indexHTML: joi.string(),
css: joi.string(),
scss: joi.string(),
components: joi.object()
.keys({
Nav: component,
@@ -109,10 +111,4 @@ export default joi.object({
hooks: joi.object().keys({
afterError: joi.func(),
}),
paths: joi.object()
.keys({
configDir: joi.string(),
config: joi.string(),
scss: joi.string(),
}),
});

View File

@@ -62,6 +62,8 @@ export type PayloadConfig = {
}
disable?: boolean;
indexHTML?: string;
css?: string
scss?: string
components?: {
Nav?: React.ComponentType
Account?: React.ComponentType

View File

@@ -54,7 +54,8 @@ export default (config: Config): Configuration => ({
alias: {
'payload/config': config.paths.config,
'@payloadcms/payload$': mockModulePath,
'payload-scss-overrides': config.paths.scss,
'payload-user-css': config.admin.css,
'payload-scss-overrides': config.admin.scss,
dotenv: mockDotENVPath,
},
extensions: ['.ts', '.tsx', '.js', '.json'],