diff --git a/packages/examples/sdk-frontend-react/src/app/app.tsx b/packages/examples/sdk-frontend-react/src/app/app.tsx index 7f1db9f4c..c4fc798cd 100644 --- a/packages/examples/sdk-frontend-react/src/app/app.tsx +++ b/packages/examples/sdk-frontend-react/src/app/app.tsx @@ -313,7 +313,7 @@ export function App() { - + handleMoreOptionsClick(row, col)}> - + {selectedIndex?.length && selectedIndex[0] === row && ( setSelectedIndex(null)); - - //fix the theming - const handleMoreOptionsClick = (row: number, col: number) => { setSelectedIndex([row, col]); }; -// alert(JSON.stringify(conditionData)) return (
@@ -146,7 +142,7 @@ const ConditionsComponent = ({ conditionData,deleteFunction,updateFunction }: Cr <> {singleCriteria.type && (
1 && ( -
@@ -183,7 +178,7 @@ const ConditionsComponent = ({ conditionData,deleteFunction,updateFunction }: Cr {singleCriteria.type && ( <>
-
+ )} {conditionData && row < conditionData.length - 2 && @@ -240,7 +235,8 @@ const DropdownContainer = styled.div` left: 48%; top: 69%; border-radius: ${(props) => props.theme.borderRadius.modalInnerComponents}; - padding: 14px 8px; + + padding: 6px 32px 6px 12px; z-index: 999999999999 !important; display: flex; flex-direction: column !important; @@ -258,9 +254,14 @@ const DropdownContainer = styled.div` } `; -const OperatorSpan = styled.span<{ theme: IChatTheme }>` +const OperatorSpan = styled(Span)<{ theme: IChatTheme }>` padding: 4px 8px; border-radius: ${(props) => props.theme.borderRadius.modalInnerComponents}; background: ${(props) => props.theme.backgroundColor.modalHoverBackground}; color: ${(props) => props.theme.textColor?.modalSubHeadingText}; `; + +const CriteriaGroup = styled(Section)<{ theme: IChatTheme }>` + + border: ${(props) => props.theme.border?.modalInnerComponents}; +`; diff --git a/packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx b/packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx index 757eaae83..50fbec8ec 100644 --- a/packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx +++ b/packages/uiweb/src/lib/components/chat/CreateGroup/CreateGroupModal.tsx @@ -16,7 +16,7 @@ import { MdError } from 'react-icons/md'; import {Image} from "../../../config/styles" import { device } from '../../../config'; -import { CreateGroupModalProps } from '../exportedTypes'; +import { CreateGroupModalProps, IChatTheme } from '../exportedTypes'; import useMediaQuery from '../../../hooks/useMediaQuery'; import { DefineCondtion } from './DefineCondition'; import AddCriteria from './AddCriteria'; @@ -120,7 +120,8 @@ const CreateGroupDetail = ({handleNext, onClose, groupInputDetails, setGroupInpu const groupInfoToast = useToast(); const { groupName, groupDescription, groupImage } = groupInputDetails; - + const theme = useContext(ThemeContext); + const fileUploadInputRef = useRef(null); const isMobile = useMediaQuery(device.mobileL); @@ -194,8 +195,8 @@ const CreateGroupDetail = ({handleNext, onClose, groupInputDetails, setGroupInpu {!groupImage && ( - - + + )} {groupImage && ( @@ -236,7 +237,7 @@ export const GatingRulesInformation = () => { const theme = useContext(ThemeContext); return (
- + Learn more about gating rules @@ -253,12 +254,12 @@ const UploadContainer = styled.div` align-self: center; `; -const ImageContainer = styled.div` +const ImageContainer = styled.div<{theme:IChatTheme}>` margin-top: 10px; width: fit-content; cursor: pointer; border-radius: 32px; - background-color: #2f3137; + background: ${(props) => props.theme.backgroundColor.modalHoverBackground}; padding: 40px; `; const UpdatedImageContainer = styled.div` diff --git a/packages/uiweb/src/lib/components/chat/CreateGroup/MultipleCriterias.tsx b/packages/uiweb/src/lib/components/chat/CreateGroup/MultipleCriterias.tsx index 04c3c8f6a..f1f3386f3 100644 --- a/packages/uiweb/src/lib/components/chat/CreateGroup/MultipleCriterias.tsx +++ b/packages/uiweb/src/lib/components/chat/CreateGroup/MultipleCriterias.tsx @@ -1,12 +1,13 @@ -import React, { useContext, useState } from 'react'; +import React, { useContext, useRef, useState } from 'react'; import { Section, Span } from '../../reusables'; import { ThemeContext } from '../theme/ThemeProvider'; import styled from 'styled-components'; import { device } from '../../../config'; import EditSvg from '../../../icons/EditSvg.svg'; import RemoveSvg from '../../../icons/RemoveSvg.svg'; -import Criteria from './Criteria'; import { ConditionType } from './Type'; +import Criteria from './ConditionsComponent'; +import { useClickAway } from '../../../hooks'; export type CriteraValueType = { invertedIcon?: any; @@ -30,6 +31,8 @@ const MultipleCriterias = ({ }: CriteriaProps) => { const [selectedValue, setSelectedValue] = useState(0); const [dropdownHeight, setDropdownHeight] = useState(0); + const [selectedIndex, setSelectedIndex] = useState(null); + const dropdownRef = useRef(null); const dropDownValues = [ { @@ -52,6 +55,7 @@ const MultipleCriterias = ({ const [openDropdownId, setOpenDropdownId] = useState(null); + const toggleDropdown = (criteriaId: number) => { if (openDropdownId === criteriaId) { // Clicked on an already open dropdown, so close it @@ -62,6 +66,8 @@ const MultipleCriterias = ({ } }; + useClickAway(dropdownRef, () => setSelectedIndex(null)); + return (
{ diff --git a/packages/uiweb/src/lib/components/chat/reusables/OptionButtons.tsx b/packages/uiweb/src/lib/components/chat/reusables/OptionButtons.tsx index d97524be8..cdcdc3f53 100644 --- a/packages/uiweb/src/lib/components/chat/reusables/OptionButtons.tsx +++ b/packages/uiweb/src/lib/components/chat/reusables/OptionButtons.tsx @@ -35,7 +35,7 @@ const OptionDescripton = ({ heading, subHeading,value }: OptionDescription) => { // selectedValue === value? // theme.textColor?.modalHeadingText // : - theme.textColor?.modalSubHeadingText + theme.textColor?.modalHeadingText } fontSize="18px" fontWeight="500" diff --git a/packages/uiweb/src/lib/components/chat/reusables/TextArea.tsx b/packages/uiweb/src/lib/components/chat/reusables/TextArea.tsx index a96b75b1e..96385f883 100644 --- a/packages/uiweb/src/lib/components/chat/reusables/TextArea.tsx +++ b/packages/uiweb/src/lib/components/chat/reusables/TextArea.tsx @@ -69,6 +69,9 @@ const Input = styled.textarea` font-family: ${(props) => props.theme.fontFamily}; font-size: 14px; + &:focus { + border: 1px solid #ffdbf0; + } `; const CharCounter = styled.div` diff --git a/packages/uiweb/src/lib/components/chat/reusables/TextInput.tsx b/packages/uiweb/src/lib/components/chat/reusables/TextInput.tsx index cfd92359c..1d5c54995 100644 --- a/packages/uiweb/src/lib/components/chat/reusables/TextInput.tsx +++ b/packages/uiweb/src/lib/components/chat/reusables/TextInput.tsx @@ -93,6 +93,10 @@ const Input = styled.input` [readonly='readonly'] { pointer-events: none; } + &:focus { + border: 1px solid #ffdbf0; + } + `; const CharCounter = styled.div` diff --git a/packages/uiweb/src/lib/components/chat/theme/index.ts b/packages/uiweb/src/lib/components/chat/theme/index.ts index 345ebaa40..b1ccb2ca7 100644 --- a/packages/uiweb/src/lib/components/chat/theme/index.ts +++ b/packages/uiweb/src/lib/components/chat/theme/index.ts @@ -231,7 +231,7 @@ export const darkChatTheme: IChatTheme = { encryptionMessageBackground: 'rgb(64, 70, 80);', buttonBackground: 'rgb(202, 89, 155)', modalBackground:'rgb(47, 49, 55)', - modalInputBackground:'rgb(40, 42, 46)', + modalInputBackground:'transparent', modalHoverBackground:'rgb(64, 70, 80)', buttonDisableBackground:'#2F3137', toastSuccessBackground: diff --git a/packages/uiweb/src/lib/icons/EditSvg.svg b/packages/uiweb/src/lib/icons/EditSvg.svg index 7cb5620d0..421ac7e02 100644 --- a/packages/uiweb/src/lib/icons/EditSvg.svg +++ b/packages/uiweb/src/lib/icons/EditSvg.svg @@ -1,4 +1,4 @@ - - + + diff --git a/packages/uiweb/src/lib/icons/MoreDark.tsx b/packages/uiweb/src/lib/icons/MoreDark.tsx index 3f20f22fd..68f70fead 100644 --- a/packages/uiweb/src/lib/icons/MoreDark.tsx +++ b/packages/uiweb/src/lib/icons/MoreDark.tsx @@ -1,11 +1,11 @@ import React from 'react'; -export const MoreDarkIcon = () => { +export const MoreDarkIcon = ({color}:{color?:string}) => { return ( - - - + + + ); }; diff --git a/packages/uiweb/src/lib/icons/RemoveSvg.svg b/packages/uiweb/src/lib/icons/RemoveSvg.svg index 2d1e05afe..747fac136 100644 --- a/packages/uiweb/src/lib/icons/RemoveSvg.svg +++ b/packages/uiweb/src/lib/icons/RemoveSvg.svg @@ -1,4 +1,4 @@ - - + + diff --git a/packages/uiweb/src/lib/icons/SpamIcon.tsx b/packages/uiweb/src/lib/icons/SpamIcon.tsx index 5917b6e63..3e25d871e 100644 --- a/packages/uiweb/src/lib/icons/SpamIcon.tsx +++ b/packages/uiweb/src/lib/icons/SpamIcon.tsx @@ -1,8 +1,8 @@ -export const SpamIcon = () => { +export const SpamIcon = ({ color }: { color?: string }) => { return ( - - + + ) } \ No newline at end of file