Skip to content

Commit

Permalink
Update error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
liamqma committed Aug 21, 2023
1 parent 3f6a017 commit 4748a80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/babel-plugin/src/utils/css-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import type { EvaluateExpression } from './types';
// The messages are exported for testing.
export enum ErrorMessages {
NUMBER_OF_ARGUMENT = 'You must provide cssMap with only one argument.',
ARGUMENT_TYPE = 'cssMap can receive object only.',
ARGUMENT_TYPE = 'cssMap can only receive an object.',
NESTED_VARIANT = 'You cannot access a nested CSS Map.',
VARIANT_CALL_EXPRESSION = 'You cannot use a function call to access a CSS Map.',
VARIANT_ACCESS = "You cannot access a CSS Map this way. Please use a string literal (e.g. styles['variantName']) or an identifier (e.g. styles[variantName]).",
STATIC_VARIANT_OBJECT = 'You must statically define variant object.',
STATIC_VARIANT_KEY = 'You must statically define variant keys.',
STATIC_VARIANT_OBJECT = 'The variant object must be statically defined.',
STATIC_VARIANT_KEY = 'The variant key must be statically defined.',
}

const createErrorMessage = (message: string): string => {
Expand Down

0 comments on commit 4748a80

Please sign in to comment.