From d0713bad29b21add73e25fcc6e6fa9c2dcbe3467 Mon Sep 17 00:00:00 2001 From: Christopher Astfalk Date: Mon, 30 Nov 2020 02:17:47 +0100 Subject: [PATCH] refactor(tailwind): move from custom-form to forms and update classes --- package-lock.json | 10 ++++----- package.json | 2 +- src/components/accountDialog.js | 10 ++++----- src/components/chatDialog.js | 2 +- src/components/friendsList.js | 2 +- src/components/login/avatarLogin.js | 2 +- src/components/login/newAvatarLogin.js | 22 ++++++++++---------- src/components/modals/resetPasswordDialog.js | 6 +++--- src/components/modals/signIn.js | 6 +++--- src/components/modals/unlockDialog.js | 2 +- tailwind.config.js | 3 +-- 11 files changed, 32 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index f9a2bef..3c72ef1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2488,15 +2488,13 @@ "defer-to-connect": "^1.0.1" } }, - "@tailwindcss/custom-forms": { + "@tailwindcss/forms": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/custom-forms/-/custom-forms-0.2.1.tgz", - "integrity": "sha512-XdP5XY6kxo3x5o50mWUyoYWxOPV16baagLoZ5uM41gh6IhXzhz/vJYzqrTb/lN58maGIKlpkxgVsQUNSsbAS3Q==", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.2.1.tgz", + "integrity": "sha512-czfvEdY+J2Ogfd6RUSr/ZSUmDxTujr34M++YLnp2cCPC3oJ4kFvFMaRXA6cEXKw7F1hJuapdjXRjsXIEXGgORg==", "dev": true, "requires": { - "lodash": "^4.17.11", - "mini-svg-data-uri": "^1.0.3", - "traverse": "^0.6.6" + "mini-svg-data-uri": "^1.2.3" } }, "@testing-library/dom": { diff --git a/package.json b/package.json index 295994e..c212297 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "@reduxjs/toolkit": "^1.5.0", - "@tailwindcss/custom-forms": "^0.2.1", + "@tailwindcss/forms": "^0.2.1", "@testing-library/jest-dom": "^5.11.6", "@testing-library/react": "^11.2.2", "@testing-library/react-hooks": "^3.4.2", diff --git a/src/components/accountDialog.js b/src/components/accountDialog.js index 2c99960..2fb8a4f 100644 --- a/src/components/accountDialog.js +++ b/src/components/accountDialog.js @@ -103,7 +103,7 @@ export default function AccountPanel () { {...changedUsername} id='usernameChange' type='email' - className='block w-full mt-1 text-gray-900 form-input' + className='block w-full mt-1 text-gray-900 border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' disabled={isUpdating} autoFocus required @@ -117,7 +117,7 @@ export default function AccountPanel () { {...oldPassword} id='passwordChangeOld' type='password' - className='block w-full mt-1 text-gray-900 form-input' + className='block w-full mt-1 text-gray-900 border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' autoComplete='current-password' minLength='8' required={username !== changedUsername.value || passwordRequired} @@ -138,7 +138,7 @@ export default function AccountPanel () { {...newPassword} id='passwordChangeNew' type='password' - className='block w-full mt-1 text-gray-900 form-input' + className='block w-full mt-1 text-gray-900 border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' autoComplete='new-password' minLength='8' required={passwordRequired} @@ -162,7 +162,7 @@ export default function AccountPanel () { {...newPassword2} id='passwordChangeNew2' type='password' - className='block w-full mt-1 text-gray-900 form-input' + className='block w-full mt-1 text-gray-900 border-gray-300 rounded-md shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' autoComplete='new-password' minLength='8' required={passwordRequired} @@ -361,7 +361,7 @@ function DeleteAccountModal () { { setPassword(event.target.value) diff --git a/src/components/chatDialog.js b/src/components/chatDialog.js index 1706540..100fd29 100644 --- a/src/components/chatDialog.js +++ b/src/components/chatDialog.js @@ -64,7 +64,7 @@ export default function ChatDialog ({ isIM = false, data = {}, sendTo, loadHisto
{ setPassword(event.target.value) }} required diff --git a/src/components/login/newAvatarLogin.js b/src/components/login/newAvatarLogin.js index 477fe18..3fa1fd2 100644 --- a/src/components/login/newAvatarLogin.js +++ b/src/components/login/newAvatarLogin.js @@ -45,9 +45,9 @@ export default function NewAvatarLogin ({ >