Skip to content

Commit

Permalink
change 'default' to 'DEFAULT'
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-rogerson committed Nov 20, 2020
1 parent 7cc2f9c commit 8abbd36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/plugins/divide.js
Expand Up @@ -83,7 +83,7 @@ export default properties => {
}

const widthMatch =
match(/(?<=(divide)-(x|y))([^]*)/) || (match(/^divide-(x|y)$/) && 'default')
match(/(?<=(divide)-(x|y))([^]*)/) || (match(/^divide-(x|y)$/) && 'DEFAULT')
if (widthMatch) {
const widthValue = stripNegative(widthMatch) || ''
const widthProperties = {
Expand Down
2 changes: 1 addition & 1 deletion src/suggestions.js
Expand Up @@ -40,7 +40,7 @@ const flattenObject = (object, prefix = '') =>

const targetTransforms = [
({ target }) => (target === 'default' ? '' : target),
({ target }) => (target.endsWith('-default') ? target.slice(0, -8) : target),
({ target }) => (target.endsWith('-DEFAULT') ? target.slice(0, -8) : target),
({ dynamicKey, target }) => {
const prefix = target !== stripNegative(target) ? '-' : ''
return `${prefix}${[dynamicKey, stripNegative(target)]
Expand Down
6 changes: 3 additions & 3 deletions src/utils/getConfigValue.js
Expand Up @@ -59,8 +59,8 @@ const getConfigValue = (from, matcher) => {
if (!from) return

// Match default value from current object
if (isEmpty(matcher) && !isEmpty(from.default)) {
return normalizeValue(from.default)
if (isEmpty(matcher) && !isEmpty(from.DEFAULT)) {
return normalizeValue(from.DEFAULT)
}

const match = from[matcher]
Expand All @@ -72,7 +72,7 @@ const getConfigValue = (from, matcher) => {
}

// Match default value from child object
const defaultMatch = typeof match === 'object' && match.default
const defaultMatch = typeof match === 'object' && match.DEFAULT
if (defaultMatch) {
return normalizeValue(defaultMatch)
}
Expand Down
8 changes: 4 additions & 4 deletions tailwind.config.js
Expand Up @@ -69,7 +69,7 @@ module.exports = {
theme: {
container: {
padding: {
default: ['1rem', '2rem'],
DEFAULT: ['1rem', '2rem'],
sm: ['2rem'],
lg: '4rem',
xl: '6rem',
Expand All @@ -78,14 +78,14 @@ module.exports = {
'object-min-max': '12rem',
},
margin: {
default: ['2rem', '3rem'],
DEFAULT: ['2rem', '3rem'],
sm: ['auto'],
lg: '5rem',
xl: '7rem',
},
},
fluidContainer: {
default: '10%',
DEFAULT: '10%',
small: '25%',
large: '75%',
},
Expand All @@ -100,7 +100,7 @@ module.exports = {
number: 0,
'purple-hyphen': 'purple',
mycolors: {
default: 'blue',
DEFAULT: 'blue',
'a-purple': 'purple',
'a-number': 0,
array: ['blue', 'purple', 'orange'],
Expand Down

0 comments on commit 8abbd36

Please sign in to comment.