From e02f4b84330c9232421beb87539a4b33ef93f734 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 26 Feb 2022 22:06:47 -0500 Subject: [PATCH] Raw styling needed for mass actions bar --- .../components/admin/users/UsersContainerV2.tsx | 16 +++++++++++++++- .../components/elements/inputs/Checkbox.tsx | 12 +++++++++--- .../components/elements/inputs/inputs.module.css | 5 +++++ 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/resources/scripts/components/admin/users/UsersContainerV2.tsx b/resources/scripts/components/admin/users/UsersContainerV2.tsx index 21c85ae4d..96f57feca 100644 --- a/resources/scripts/components/admin/users/UsersContainerV2.tsx +++ b/resources/scripts/components/admin/users/UsersContainerV2.tsx @@ -51,13 +51,27 @@ const UsersContainerV2 = () => { Delete -
+
+
+
+ +
+ + + + + + + + + +
diff --git a/resources/scripts/components/elements/inputs/Checkbox.tsx b/resources/scripts/components/elements/inputs/Checkbox.tsx index 7e5d1e3c7..2c09c0367 100644 --- a/resources/scripts/components/elements/inputs/Checkbox.tsx +++ b/resources/scripts/components/elements/inputs/Checkbox.tsx @@ -2,12 +2,18 @@ import React, { forwardRef } from 'react'; import styles from './inputs.module.css'; import classNames from 'classnames'; -type Props = Omit, 'type'> +type Props = Omit, 'type'> & { + indeterminate?: boolean; +} -export default forwardRef(({ className, ...props }, ref) => ( +export default forwardRef(({ className, indeterminate, ...props }, ref) => ( )); diff --git a/resources/scripts/components/elements/inputs/inputs.module.css b/resources/scripts/components/elements/inputs/inputs.module.css index c32a23fb8..80295c7a8 100644 --- a/resources/scripts/components/elements/inputs/inputs.module.css +++ b/resources/scripts/components/elements/inputs/inputs.module.css @@ -4,6 +4,11 @@ &:focus, &:active { @apply ring-2 ring-primary-500 ring-offset-2 ring-offset-neutral-700; } + + &.indeterminate:checked { + @apply text-primary-500/50 border border-primary-500; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z' clip-rule='evenodd' /%3E%3C/svg%3E"); + } } .text_input {