diff --git a/.yarn/cache/prettier-plugin-tailwindcss-npm-0.1.11-09d87a10a6-b06a81a222.zip b/.yarn/cache/prettier-plugin-tailwindcss-npm-0.1.11-09d87a10a6-b06a81a222.zip new file mode 100644 index 000000000..3aa21b056 Binary files /dev/null and b/.yarn/cache/prettier-plugin-tailwindcss-npm-0.1.11-09d87a10a6-b06a81a222.zip differ diff --git a/packages/toast/src/Toast.tsx b/packages/toast/src/Toast.tsx index e970dcdc3..17634ab14 100644 --- a/packages/toast/src/Toast.tsx +++ b/packages/toast/src/Toast.tsx @@ -23,12 +23,12 @@ const colorForToastType = (type: ToastType) => { const iconForToastType = (type: ToastType) => { switch (type) { case ToastType.Success: - return + return case ToastType.Error: - return + return case ToastType.Progress: case ToastType.Loading: - return
+ return
default: return null } @@ -77,7 +77,7 @@ export const Toast = forwardRef(({ toast, index }: Props, ref: ForwardedRef -
- {icon ?
{icon}
: null} -
{toast.message}
+
+ {icon ?
{icon}
: null} +
{toast.message}
{hasActions && (
{toast.actions?.map((action, index) => ( @@ -101,7 +101,7 @@ export const Toast = forwardRef(({ toast, index }: Props, ref: ForwardedRef { @@ -116,9 +116,9 @@ export const Toast = forwardRef(({ toast, index }: Props, ref: ForwardedRef {hasProgress && ( -
+
{ } return ( -
+
{toasts.map((toast, index) => ( ))} diff --git a/packages/web/package.json b/packages/web/package.json index 531341002..726d8fb6e 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -47,6 +47,7 @@ "postcss": "^8.4.14", "postcss-loader": "^7.0.0", "prettier": "*", + "prettier-plugin-tailwindcss": "^0.1.11", "sass-loader": "*", "svg-jest": "^1.0.1", "tailwindcss": "^3.1.4", diff --git a/packages/web/prettier.config.js b/packages/web/prettier.config.js new file mode 100644 index 000000000..18bf897d3 --- /dev/null +++ b/packages/web/prettier.config.js @@ -0,0 +1,7 @@ +module.exports = { + singleQuote: true, + trailingComma: 'all', + printWidth: 120, + semi: false, + plugins: [require('prettier-plugin-tailwindcss')], +} diff --git a/packages/web/src/javascripts/Components/AccountMenu/AccountMenu.tsx b/packages/web/src/javascripts/Components/AccountMenu/AccountMenu.tsx index c1f249cda..8c34f60dd 100644 --- a/packages/web/src/javascripts/Components/AccountMenu/AccountMenu.tsx +++ b/packages/web/src/javascripts/Components/AccountMenu/AccountMenu.tsx @@ -58,9 +58,9 @@ const AccountMenu: FunctionComponent = ({ return (
= ({ return ( <> {showAdvanced ? ( -
+
{children} -
+
= ({ )} {onStrictSignInChange && ( -
+
= ({ return ( <> -
+
-
Confirm password
+
Confirm password
-
+
Because your notes are encrypted using your password,{' '} Standard Notes does not have a password reset option. If you forget your password, you will permanently lose access to your data.
-
+ = ({ ref={passwordInputRef} value={confirmPassword} /> - {error ?
{error}
: null} + {error ?
{error}
: null}
-
+
{filteredList.length > 0 || searchQuery.length > 0 ? ( -
+
{ @@ -122,7 +122,7 @@ const AttachedFilesPopover: FunctionComponent = ({ /> {searchQuery.length > 0 && ( -
Or drop your files here
+
Or drop your files here
)}
{filteredList.length > 0 && ( -
+
File ID: {file.uuid}
diff --git a/packages/web/src/javascripts/Components/Button/IconButton.tsx b/packages/web/src/javascripts/Components/Button/IconButton.tsx index 726c5564c..d002f6e9f 100644 --- a/packages/web/src/javascripts/Components/Button/IconButton.tsx +++ b/packages/web/src/javascripts/Components/Button/IconButton.tsx @@ -30,7 +30,7 @@ const IconButton: FunctionComponent = ({ )} - -
{challenge.heading}
+ +
{challenge.heading}
{challenge.subheading && ( -
{challenge.subheading}
+
{challenge.subheading}
)} { e.preventDefault() submit() @@ -224,12 +224,12 @@ const ChallengeModal: FunctionComponent = ({ /> ))} - {shouldShowForgotPasscode && ( {isOpen && (
= ({ }} onBlur={closeOnBlur} ref={buttonRef} - className="flex justify-center items-center min-w-8 h-8 hover:bg-contrast focus:bg-contrast text-neutral border border-solid border-border rounded-full cursor-pointer" + className="flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-full border border-solid border-border text-neutral hover:bg-contrast focus:bg-contrast" > Change note type @@ -89,7 +89,7 @@ const ChangeEditorButton: FunctionComponent = ({ ...position, maxHeight, }} - className="bg-default rounded shadow-main transition-transform duration-150 slide-down-animation min-w-68 max-h-120 max-w-xs flex flex-col overflow-y-auto fixed" + className="slide-down-animation max-h-120 fixed flex min-w-68 max-w-xs flex-col overflow-y-auto rounded bg-default shadow-main transition-transform duration-150" onBlur={closeOnBlur} > {isOpen && ( diff --git a/packages/web/src/javascripts/Components/ChangeEditor/ChangeEditorMenu.tsx b/packages/web/src/javascripts/Components/ChangeEditor/ChangeEditorMenu.tsx index 7c285adec..794c9f5d0 100644 --- a/packages/web/src/javascripts/Components/ChangeEditor/ChangeEditorMenu.tsx +++ b/packages/web/src/javascripts/Components/ChangeEditor/ChangeEditorMenu.tsx @@ -183,7 +183,7 @@ const ChangeEditorMenu: FunctionComponent = ({ return ( -
+
{group.items.map((item) => { const onClickEditorItem = () => { selectEditor(item).catch(console.error) @@ -193,7 +193,7 @@ const ChangeEditorMenu: FunctionComponent = ({ key={item.name} type={MenuItemType.RadioButton} onClick={onClickEditorItem} - className={'py-2 flex-row-reverse'} + className={'flex-row-reverse py-2'} onBlur={closeOnBlur} checked={item.isEntitled ? isSelectedEditor(item) : undefined} > diff --git a/packages/web/src/javascripts/Components/Checkbox/Checkbox.tsx b/packages/web/src/javascripts/Components/Checkbox/Checkbox.tsx index a941acfac..e2ace706a 100644 --- a/packages/web/src/javascripts/Components/Checkbox/Checkbox.tsx +++ b/packages/web/src/javascripts/Components/Checkbox/Checkbox.tsx @@ -10,7 +10,7 @@ type CheckboxProps = { const Checkbox: FunctionComponent = ({ name, checked, onChange, disabled, label }) => { return ( -