Skip to content

Commit 84b6459

Browse files
committed
Rename indicatorPrefix to prefix
1 parent ee7fe31 commit 84b6459

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ module.exports = {
104104
}
105105
```
106106

107-
#### Screen Prefix
107+
#### Prefix
108108

109-
To modify the prefix for the screens, add the `indicatorPrefix` configuration.
109+
Modify the debug label prefix with the `prefix` configuration option.
110110

111111
```js
112112
// tailwind.config.js
113113
module.exports = {
114114
theme: {
115115
debugScreens: {
116-
indicatorPrefix: 'screen: ',
116+
prefix: 'screen: ',
117117
},
118118
},
119119
plugins: [

index.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ module.exports = function ({ addComponents, theme }) {
22
const screens = theme('screens');
33
const userStyles = theme('debugScreens.style', {});
44
const ignoredScreens = theme('debugScreens.ignore', [])
5+
const prefix = theme('debugScreens.prefix', 'screen: ');
56

67
const defaultPosition = ['bottom', 'left'];
78
const position = theme('debugScreens.position', defaultPosition);
89
const positionY = position[0] || defaultPosition[0];
910
const positionX = position[1] || defaultPosition[1];
1011

11-
const indicatorPrefix = theme('debugScreens.indicatorPrefix', 'screens: ');
12-
1312
const components = {
1413
'.debug-screens::before': Object.assign({
1514
position: 'fixed',
@@ -23,7 +22,7 @@ module.exports = function ({ addComponents, theme }) {
2322
backgroundColor: '#000',
2423
color: '#fff',
2524
boxShadow: '0 0 0 1px #fff',
26-
content: `'${indicatorPrefix}_'`,
25+
content: `'${prefix}_'`,
2726
}, userStyles),
2827
};
2928

@@ -32,7 +31,7 @@ module.exports = function ({ addComponents, theme }) {
3231
.forEach(([screen]) => {
3332
components[`@screen ${screen}`] = {
3433
'.debug-screens::before': {
35-
content: `'${indicatorPrefix}${screen}'`,
34+
content: `'${prefix}${screen}'`,
3635
},
3736
};
3837
});

0 commit comments

Comments
 (0)