-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
80 lines (73 loc) · 1.78 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
'use strict';
const { ...colors } = require('./config/colors');
const {
fontFamily,
fontSize,
fontWeight,
letterSpacing,
lineHeight,
} = require('./config/typography');
const fluidBasePlugin = require('./plugins/base');
const bodyTextComponentsPlugin = require('./plugins/components/body-text');
const captionTextComponentsPlugin = require('./plugins/components/caption-text');
const headingTextComponentsPlugin = require('./plugins/components/heading-text');
const MuiTypographyComponentsPlugin = require('./plugins/components/mui-typography');
const buttonComponentsPlugin = require('./plugins/components/buttons');
const bannerComponentsPlugin = require('./plugins/components/banners');
const BORDER_COLOR_VARIANTS = [
// Default
'responsive',
'hover',
'focus',
// Custom
'disabled',
'focus-within',
];
/**
* Configures Tailwind to use Fluid's design tokens
*/
module.exports = {
// Base Config
theme: {
colors,
fontFamily,
fontSize,
fontWeight,
letterSpacing,
lineHeight,
fill: {
...colors,
current: 'currentColor',
},
stroke: {
...colors,
current: 'currentColor',
},
screens: {},
},
// Additions to the Base Config (Added to default values)
extend: {
maxHeight: {
modal: '90vh',
},
maxWidth: {
container: '960px',
'screen-xl': '1280px',
},
},
variants: {
borderColor: BORDER_COLOR_VARIANTS,
visibility: ['responsive', 'group-hover'],
},
plugins: [
fluidBasePlugin,
bodyTextComponentsPlugin,
captionTextComponentsPlugin,
headingTextComponentsPlugin,
buttonComponentsPlugin,
bannerComponentsPlugin,
MuiTypographyComponentsPlugin,
],
// Export constants used in configuration to enable extension
BORDER_COLOR_VARIANTS,
};