Skip to content

Commit c75f898

Browse files
committed
Update to Tailwind V2
1 parent 9b01734 commit c75f898

File tree

8 files changed

+168
-199
lines changed

8 files changed

+168
-199
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"@fortawesome/fontawesome-svg-core": "^1.2.32",
55
"@fortawesome/free-solid-svg-icons": "^5.15.1",
66
"@fortawesome/react-fontawesome": "^0.1.11",
7-
"@types/react-copy-to-clipboard": "^4.3.0",
7+
"@tailwindcss/forms": "^0.2.1",
88
"axios": "^0.19.2",
99
"chart.js": "^2.8.0",
1010
"codemirror": "^5.57.0",
@@ -38,6 +38,7 @@
3838
"styled-components": "^5.1.1",
3939
"styled-components-breakpoint": "^3.0.0-preview.20",
4040
"swr": "^0.2.3",
41+
"tailwindcss": "^2.0.2",
4142
"uuid": "^3.3.2",
4243
"xterm": "^4.9.0",
4344
"xterm-addon-attach": "^0.6.0",
@@ -67,6 +68,7 @@
6768
"@types/node": "^14.11.10",
6869
"@types/query-string": "^6.3.0",
6970
"@types/react": "^16.9.41",
71+
"@types/react-copy-to-clipboard": "^4.3.0",
7072
"@types/react-dom": "^16.9.8",
7173
"@types/react-helmet": "^6.0.0",
7274
"@types/react-redux": "^7.1.1",
@@ -96,9 +98,8 @@
9698
"source-map-loader": "^1.0.1",
9799
"style-loader": "^1.2.1",
98100
"svg-url-loader": "^6.0.0",
99-
"tailwindcss": "^1.9.4",
100101
"terser-webpack-plugin": "^3.0.6",
101-
"twin.macro": "^1.10.0",
102+
"twin.macro": "^2.0.7",
102103
"typescript": "^3.9.6",
103104
"typescript-plugin-tw-template": "^2.0.1",
104105
"webpack": "^4.43.0",

resources/scripts/components/dashboard/AccountApiContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default () => {
5050
return (
5151
<PageContentBlock title={'Account API'}>
5252
<FlashMessageRender byKey={'account'}/>
53-
<div css={tw`md:flex flex-no-wrap my-10`}>
53+
<div css={tw`md:flex flex-nowrap my-10`}>
5454
<ContentBox title={'Create API Key'} css={tw`flex-none w-full md:w-1/2`}>
5555
<CreateApiKeyForm onKeyCreated={key => setKeys(s => ([ ...s!, key ]))}/>
5656
</ContentBox>

resources/scripts/components/elements/SubNavigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const SubNavigation = styled.div`
1111
max-width: 1200px;
1212
1313
& > a, & > div {
14-
${tw`inline-block py-3 px-4 text-neutral-300 no-underline whitespace-no-wrap transition-all duration-150`};
14+
${tw`inline-block py-3 px-4 text-neutral-300 no-underline whitespace-nowrap transition-all duration-150`};
1515
1616
&:not(:first-of-type) {
1717
${tw`ml-2`};

resources/scripts/components/server/backups/BackupRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default ({ backup, className }: Props) => {
4040
});
4141

4242
return (
43-
<GreyRowBox css={tw`flex-wrap md:flex-no-wrap items-center`} className={className}>
43+
<GreyRowBox css={tw`flex-wrap md:flex-nowrap items-center`} className={className}>
4444
<div css={tw`flex items-center truncate w-full md:flex-1`}>
4545
<div css={tw`mr-4`}>
4646
{backup.completedAt ?
@@ -60,7 +60,7 @@ export default ({ backup, className }: Props) => {
6060
{backup.name}
6161
</p>
6262
{(backup.completedAt && backup.isSuccessful) &&
63-
<span css={tw`ml-3 text-neutral-300 text-xs font-thin hidden sm:inline`}>{bytesToHuman(backup.bytes)}</span>
63+
<span css={tw`ml-3 text-neutral-300 text-xs font-extralight hidden sm:inline`}>{bytesToHuman(backup.bytes)}</span>
6464
}
6565
</div>
6666
<p css={tw`mt-1 md:mt-0 text-xs text-neutral-400 font-mono truncate`}>

resources/scripts/components/server/files/FileManagerContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default () => {
5858

5959
return (
6060
<ServerContentBlock title={'File Manager'} showFlashKey={'files'}>
61-
<div css={tw`flex flex-wrap-reverse md:flex-no-wrap justify-center mb-4`}>
61+
<div css={tw`flex flex-wrap-reverse md:flex-nowrap justify-center mb-4`}>
6262
<ErrorBoundary>
6363
<FileManagerBreadcrumbs
6464
renderLeft={
@@ -73,7 +73,7 @@ export default () => {
7373
</ErrorBoundary>
7474
<Can action={'file.create'}>
7575
<ErrorBoundary>
76-
<div css={tw`flex flex-shrink-0 flex-wrap-reverse md:flex-no-wrap justify-end mb-4 md:mb-0 ml-0 md:ml-auto`}>
76+
<div css={tw`flex flex-shrink-0 flex-wrap-reverse md:flex-nowrap justify-end mb-4 md:mb-0 ml-0 md:ml-auto`}>
7777
<NewDirectoryButton css={tw`w-full flex-none mt-4 sm:mt-0 sm:w-auto sm:mr-4`}/>
7878
<UploadButton css={tw`flex-1 mr-4 sm:flex-none sm:mt-0`}/>
7979
<NavLink

resources/scripts/components/server/network/AllocationRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const AllocationRow = ({ allocation }: Props) => {
5858
};
5959

6060
return (
61-
<GreyRowBox $hoverable={false} css={tw`flex-wrap md:flex-no-wrap mt-2`}>
61+
<GreyRowBox $hoverable={false} css={tw`flex-wrap md:flex-nowrap mt-2`}>
6262
<div css={tw`flex items-center w-full md:w-auto`}>
6363
<div css={tw`pl-4 pr-6 text-neutral-400`}>
6464
<FontAwesomeIcon icon={faNetworkWired}/>

tailwind.config.js

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,14 @@
11
module.exports = {
22
theme: {
33
fontFamily: {
4-
sans: [
5-
'Rubik',
6-
'-apple-system',
7-
'BlinkMacSystemFont',
8-
'"Helvetica Neue"',
9-
'"Roboto"',
10-
'system-ui',
11-
'sans-serif',
12-
],
13-
header: [
14-
'"IBM Plex Sans"',
15-
'"Roboto"',
16-
'system-ui',
17-
'sans-serif',
18-
],
19-
serif: [
20-
'Constantia',
21-
'"Lucida Bright"',
22-
'Lucidabright',
23-
'"Lucida Serif"',
24-
'Lucida',
25-
'serif',
26-
],
27-
mono: [
28-
'"IBM Plex Mono"',
29-
'"Source Code Pro"',
30-
'SourceCodePro',
31-
'Menlo',
32-
'Monaco',
33-
'Consolas',
34-
'monospace',
35-
],
4+
sans: [ 'Rubik', '-apple-system', 'BlinkMacSystemFont', '"Helvetica Neue"', '"Roboto"', 'system-ui', 'sans-serif' ],
5+
header: [ '"IBM Plex Sans"', '"Roboto"', 'system-ui', 'sans-serif' ],
6+
mono: [ '"IBM Plex Mono"', '"Source Code Pro"', 'SourceCodePro', 'Menlo', 'Monaco', 'Consolas', 'monospace' ],
367
},
378
colors: {
389
transparent: 'transparent',
3910
black: 'hsl(210, 27%, 10%)',
4011
white: '#ffffff',
41-
'basically-white': '#fafafb',
4212
primary: {
4313
50: 'hsl(202, 100%, 95%)', // lightest
4414
100: 'hsl(204, 100%, 86%)', // lighter
@@ -119,11 +89,8 @@ module.exports = {
11989
transitionDuration: {
12090
250: '250ms',
12191
},
122-
minWidth: {
123-
'48': '12rem',
124-
},
12592
borderColor: theme => ({
126-
default: theme('colors.neutral.400', 'cuurrentColor'),
93+
default: theme('colors.neutral.400', 'currentColor'),
12794
}),
12895
},
12996
},

0 commit comments

Comments
 (0)