styling groceries a little better
This commit is contained in:
@@ -20,9 +20,6 @@ const WrapperDropdown = styled(View)`
|
|||||||
const DropdownItem = styled(Text)`
|
const DropdownItem = styled(Text)`
|
||||||
color: ${({ theme }) => theme.colors.textW2};
|
color: ${({ theme }) => theme.colors.textW2};
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
&:hover{
|
|
||||||
background-color: #0001;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
const HorizontalSeperator = styled(View)`
|
const HorizontalSeperator = styled(View)`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ const TabMenu = (props) => {
|
|||||||
<Wrapper>
|
<Wrapper>
|
||||||
<WrapperSelected previousPos = {previousPos} currenttab={props.currentTab}/>
|
<WrapperSelected previousPos = {previousPos} currenttab={props.currentTab}/>
|
||||||
<WrapperGroceries currenttab={props.currentTab} onClick={()=>handleTabPress("Groceries")}>
|
<WrapperGroceries currenttab={props.currentTab} onClick={()=>handleTabPress("Groceries")}>
|
||||||
<IconGroceries currenttab={props.currentTab}/>
|
{/* <IconGroceries currenttab={props.currentTab}/> */}
|
||||||
</WrapperGroceries>
|
</WrapperGroceries>
|
||||||
<WrapperProducts currenttab={props.currentTab} onClick={()=>handleTabPress("Products")}>
|
<WrapperProducts currenttab={props.currentTab} onClick={()=>handleTabPress("Products")}>
|
||||||
<IconProducts currenttab={props.currentTab}/>
|
{/* <IconProducts currenttab={props.currentTab}/> */}
|
||||||
</WrapperProducts>
|
</WrapperProducts>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const SelectAllItemsButton = (props) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WrapperSelect toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
<WrapperSelect toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
||||||
<CheckIcon />
|
{/* <CheckIcon /> */}
|
||||||
</WrapperSelect>
|
</WrapperSelect>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ const RemoveItemsButton = (props) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WrapperRemove toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
<WrapperRemove toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
||||||
<RemoveIcon />
|
{/* <RemoveIcon /> */}
|
||||||
</WrapperRemove>
|
</WrapperRemove>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ export const ContainerButtons = (props) => {
|
|||||||
<SelectAllItemsButton visible={visible} />
|
<SelectAllItemsButton visible={visible} />
|
||||||
<RemoveItemsButton visible={visible} />
|
<RemoveItemsButton visible={visible} />
|
||||||
<WrapperButtons toggle={visible} onClick={() => setVisible(!visible)}>
|
<WrapperButtons toggle={visible} onClick={() => setVisible(!visible)}>
|
||||||
<MenuIcon />
|
{/* <MenuIcon /> */}
|
||||||
</WrapperButtons >
|
</WrapperButtons >
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
@@ -60,7 +60,7 @@ export const AddItemButton = (props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WrapperAddItem toggle={visibleItem} onClick={() => setVisibleItem(true)}>
|
<WrapperAddItem toggle={visibleItem} onClick={() => setVisibleItem(true)}>
|
||||||
<PlusIcon />
|
{/* <PlusIcon /> */}
|
||||||
</WrapperAddItem>
|
</WrapperAddItem>
|
||||||
<ModalAddItem visible={visibleItem} closeModal={() => setVisibleItem(false)} />
|
<ModalAddItem visible={visibleItem} closeModal={() => setVisibleItem(false)} />
|
||||||
</>
|
</>
|
||||||
@@ -69,7 +69,7 @@ export const AddItemButton = (props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WrapperAddList toggle={visibleList} onClick={() => setVisibleList(true)}>
|
<WrapperAddList toggle={visibleList} onClick={() => setVisibleList(true)}>
|
||||||
<ListIcon />
|
{/* <ListIcon /> */}
|
||||||
</WrapperAddList>
|
</WrapperAddList>
|
||||||
<ModalAddList visible={visibleList} closeModal={() => setVisibleList(false)} />
|
<ModalAddList visible={visibleList} closeModal={() => setVisibleList(false)} />
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import { selectAllSortedItems } from '../../../redux/slices/groceryList/itemsSli
|
|||||||
//styles
|
//styles
|
||||||
import { WrapperGroceryList, TextTotalAmount } from './styles/list'
|
import { WrapperGroceryList, TextTotalAmount } from './styles/list'
|
||||||
import { selectAllProducts } from '../../../redux/slices/groceryList/productsSlice';
|
import { selectAllProducts } from '../../../redux/slices/groceryList/productsSlice';
|
||||||
import { View } from 'react-native';
|
import { ScrollView, View } from 'react-native';
|
||||||
|
import HeaderPadding from '../../Header';
|
||||||
|
|
||||||
const GroceryList = (props) => {
|
const GroceryList = (props) => {
|
||||||
const items = useSelector(selectAllSortedItems)
|
const items = useSelector(selectAllSortedItems)
|
||||||
@@ -25,8 +26,11 @@ const GroceryList = (props) => {
|
|||||||
return (
|
return (
|
||||||
<WrapperGroceryList>
|
<WrapperGroceryList>
|
||||||
<TextTotalAmount>total: € {totalPrice}</TextTotalAmount>
|
<TextTotalAmount>total: € {totalPrice}</TextTotalAmount>
|
||||||
{Lists}
|
<ScrollView>
|
||||||
<View style={{ height: 150 }} />
|
<HeaderPadding/>
|
||||||
|
{Lists}
|
||||||
|
<View style={{ height: 150 }} />
|
||||||
|
</ScrollView>
|
||||||
</WrapperGroceryList>
|
</WrapperGroceryList>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { useEffect, useRef, useState } from 'react'
|
import React, { useState , useEffect} from 'react'
|
||||||
//components
|
//components
|
||||||
import ListedItem from './ListedItem'
|
import ListedItem from './ListedItem'
|
||||||
import ModalEditItem from '../../modals/groceries/ModalEditItem';
|
import ModalEditItem from '../../modals/groceries/ModalEditItem';
|
||||||
import ModalEditList from '../../modals/groceries/ModalEditList';
|
import ModalEditList from '../../modals/groceries/ModalEditList';
|
||||||
// Styling
|
// Styling
|
||||||
import { Wrapper, WrapperList, WrapperListTitle, ListTitle, ListSubtitle, ButtonRemoveList, ButtonEditList, IconArrowDown, ListSizeWrapper } from './styles/list'
|
import { Wrapper, WrapperList, WrapperListTitle, ListTitle, ListSubtitle, ButtonRemoveList, ButtonEditList, IconArrowDown, ListSizeWrapper, WrapperRight, WrapperLeft } from './styles/list'
|
||||||
//redux
|
//redux
|
||||||
import { useSelector, useDispatch } from 'react-redux';
|
import { useSelector, useDispatch } from 'react-redux';
|
||||||
import { selectAllSortedItems, itemsRemovedByList } from '../../../redux/slices/groceryList/itemsSlice'
|
import { selectAllSortedItems, itemsRemovedByList } from '../../../redux/slices/groceryList/itemsSlice'
|
||||||
@@ -15,12 +15,11 @@ export default React.memo((props) => {
|
|||||||
const items = useSelector(selectAllSortedItems)
|
const items = useSelector(selectAllSortedItems)
|
||||||
const list = useSelector(state => state.lists.entities.find((list) => list._id === props.listId))
|
const list = useSelector(state => state.lists.entities.find((list) => list._id === props.listId))
|
||||||
|
|
||||||
const [height, setHeight] = useState(0);
|
const [height, setHeight] = useState(100);
|
||||||
const ref = useRef(null);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setHeight(ref.current.clientHeight);
|
setHeight(1);
|
||||||
}, [list.open, items]);
|
}, [list.open, items]);
|
||||||
|
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
@@ -41,21 +40,21 @@ export default React.memo((props) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Wrapper >
|
<Wrapper >
|
||||||
<WrapperListTitle onClick={() => { dispatch(toggleOpen(props.listId)) }}>
|
<WrapperListTitle onPress={() => { dispatch(toggleOpen(props.listId)) }}>
|
||||||
<View id="left">
|
<WrapperLeft>
|
||||||
<ListTitle>{list.listName}</ListTitle>
|
<ListTitle>{list.listName}</ListTitle>
|
||||||
<ListSubtitle>{list.listDescription && list.listDescription}</ListSubtitle>
|
<ListSubtitle>{list.listDescription && list.listDescription}</ListSubtitle>
|
||||||
</View>
|
</WrapperLeft>
|
||||||
<View id="right">
|
<WrapperRight>
|
||||||
{list.open && <>
|
{list.open && <>
|
||||||
<ButtonEditList onClick={() => setModalListVisible(true)} />
|
{/* <ButtonEditList onClick={() => setModalListVisible(true)} />
|
||||||
<ButtonRemoveList onClick={removeList} />
|
<ButtonRemoveList onClick={removeList} /> */}
|
||||||
</>}
|
</>}
|
||||||
<IconArrowDown visible={list.open.toString()} />
|
{/* <IconArrowDown visible={list.open.toString()} /> */}
|
||||||
</View>
|
</WrapperRight>
|
||||||
</WrapperListTitle>
|
</WrapperListTitle>
|
||||||
<ListSizeWrapper height={height} visible={list.open} >
|
<ListSizeWrapper height={height} visible={list.open} >
|
||||||
< WrapperList listLength={items.length} ref={ref}>
|
< WrapperList listLength={items.length} onLayout={(event) => {setHeight(event.nativeEvent.layout.height)}}>
|
||||||
{list.open && itemList}
|
{list.open && itemList}
|
||||||
{
|
{
|
||||||
itemList.length === 0 && <ListSubtitle style={{ fontSize: 22 }} >Add a grocery</ListSubtitle>
|
itemList.length === 0 && <ListSubtitle style={{ fontSize: 22 }} >Add a grocery</ListSubtitle>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { selectItemById, checkToggle, modalToggle } from '../../../redux/slices/
|
|||||||
import { findTag } from '../../../redux/slices/groceryList/tagsSlice'
|
import { findTag } from '../../../redux/slices/groceryList/tagsSlice'
|
||||||
|
|
||||||
const ListedItem = React.memo((props) => {
|
const ListedItem = React.memo((props) => {
|
||||||
console.log("Rendering item")
|
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const item = useSelector(state => selectItemById(state, props.item._id), shallowEqual)
|
const item = useSelector(state => selectItemById(state, props.item._id), shallowEqual)
|
||||||
const tag = useSelector(state => findTag(state, item.tag))
|
const tag = useSelector(state => findTag(state, item.tag))
|
||||||
@@ -20,7 +19,7 @@ const ListedItem = React.memo((props) => {
|
|||||||
<TextProductName >{item.productName}</TextProductName>
|
<TextProductName >{item.productName}</TextProductName>
|
||||||
<TextDetails>{item.details}</TextDetails>
|
<TextDetails>{item.details}</TextDetails>
|
||||||
<TextAmount>{item.amount.am}{item.amount.qt && " " + item.amount.qt}</TextAmount>
|
<TextAmount>{item.amount.am}{item.amount.qt && " " + item.amount.qt}</TextAmount>
|
||||||
{item.person && <TextPerson>{item.person}</TextPerson>}
|
<TextPerson>{item.person && item.person}</TextPerson>
|
||||||
{/* {product.image && <Image src={product.image} />} */}
|
{/* {product.image && <Image src={product.image} />} */}
|
||||||
</WrapperItem>
|
</WrapperItem>
|
||||||
</DarkLayer>
|
</DarkLayer>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import styled, { css } from 'styled-components'
|
import styled, { css } from 'styled-components'
|
||||||
//dependencies
|
//dependencies
|
||||||
import { MdAddShoppingCart, MdDeleteForever} from 'react-icons/md'
|
import { MdAddShoppingCart, MdDeleteForever } from 'react-icons/md'
|
||||||
import { FiMenu,FiCheckSquare } from 'react-icons/fi'
|
import { FiMenu, FiCheckSquare } from 'react-icons/fi'
|
||||||
import { CgFileAdd } from 'react-icons/cg'
|
import { CgFileAdd } from 'react-icons/cg'
|
||||||
//blueprints
|
//blueprints
|
||||||
import { Button } from '../../../../styles/componentBlueprints'
|
import { Button } from '../../../../styles/componentBlueprints'
|
||||||
@@ -10,114 +10,65 @@ import { Button } from '../../../../styles/componentBlueprints'
|
|||||||
export const WrapperButtons = styled(Button)`
|
export const WrapperButtons = styled(Button)`
|
||||||
position:absolute;
|
position:absolute;
|
||||||
background-color: ${({ theme }) => theme.colors.primary};
|
background-color: ${({ theme }) => theme.colors.primary};
|
||||||
bottom:50px;
|
bottom:70px;
|
||||||
left:20px;
|
left:10px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
bottom:70px;
|
|
||||||
left:10px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
|
|
||||||
export const WrapperAddItem = styled(Button)`
|
export const WrapperAddItem = styled(Button)`
|
||||||
position:absolute;
|
position:absolute;
|
||||||
background-color: ${({ theme }) => theme.colors.primary};
|
background-color: ${({ theme }) => theme.colors.primary};
|
||||||
bottom:50px;
|
bottom:70px;
|
||||||
right:20px;
|
right:10px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
bottom:70px;
|
|
||||||
right:10px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const WrapperAddList = styled(Button)`
|
export const WrapperAddList = styled(Button)`
|
||||||
position:absolute;
|
position:absolute;
|
||||||
background-color: ${({ theme }) => theme.colors.secondary};
|
background-color: ${({ theme }) => theme.colors.secondary};
|
||||||
bottom:50px;
|
bottom:70px;
|
||||||
right:20px;
|
right:10px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
bottom:70px;
|
|
||||||
right:10px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const WrapperRemove = styled(Button)`
|
export const WrapperRemove = styled(Button)`
|
||||||
position:absolute;
|
position:absolute;
|
||||||
background-color: ${({ theme }) => theme.colors.error};
|
background-color: ${({ theme }) => theme.colors.error};
|
||||||
left:20px;
|
left:10px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
left:10px;
|
|
||||||
${(props) =>
|
|
||||||
props.visible
|
|
||||||
? css`
|
|
||||||
bottom:140px;
|
|
||||||
`
|
|
||||||
: css`
|
|
||||||
bottom:70px;
|
|
||||||
`}
|
|
||||||
}
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.visible
|
props.visible
|
||||||
? css`
|
? css`
|
||||||
bottom:140px;
|
bottom:140px;
|
||||||
`
|
`
|
||||||
: css`
|
: css`
|
||||||
bottom:50px;
|
bottom:70px;
|
||||||
`}
|
`}
|
||||||
`
|
`
|
||||||
export const WrapperSelect = styled(Button)`
|
export const WrapperSelect = styled(Button)`
|
||||||
position:absolute;
|
position:absolute;
|
||||||
background-color: ${({ theme }) => theme.colors.primary};
|
background-color: ${({ theme }) => theme.colors.primary};
|
||||||
left:20px;
|
left:10px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
left:10px;
|
|
||||||
${(props) =>
|
|
||||||
props.visible
|
|
||||||
? css`
|
|
||||||
bottom:210px;
|
|
||||||
`
|
|
||||||
: css`
|
|
||||||
bottom:70px;
|
|
||||||
`};
|
|
||||||
}
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.visible
|
props.visible
|
||||||
? css`
|
? css`
|
||||||
bottom:230px;
|
bottom:210px;
|
||||||
`
|
`
|
||||||
: css`
|
: css`
|
||||||
bottom:50px;
|
bottom:70px;
|
||||||
`};
|
`};
|
||||||
`
|
`
|
||||||
export const MenuIcon = styled(FiMenu)`
|
export const MenuIcon = styled(FiMenu)`
|
||||||
color: ${({theme})=> theme.colors.textB2};
|
color: ${({ theme }) => theme.colors.textB2};
|
||||||
font-size: 60px;
|
font-size: 47px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
font-size: 47px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const PlusIcon = styled(MdAddShoppingCart)`
|
export const PlusIcon = styled(MdAddShoppingCart)`
|
||||||
color: ${({theme})=> theme.colors.textB2};
|
color: ${({ theme }) => theme.colors.textB2};
|
||||||
font-size: 60px;
|
font-size: 45px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
font-size: 45px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const RemoveIcon = styled(MdDeleteForever)`
|
export const RemoveIcon = styled(MdDeleteForever)`
|
||||||
color: ${({theme})=> theme.colors.textB2};
|
color: ${({ theme }) => theme.colors.textB2};
|
||||||
font-size: 60px;
|
font-size: 45px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
font-size: 45px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const CheckIcon = styled(FiCheckSquare)`
|
export const CheckIcon = styled(FiCheckSquare)`
|
||||||
color: ${({theme})=> theme.colors.textB2};
|
color: ${({ theme }) => theme.colors.textB2};
|
||||||
font-size: 50px;
|
font-size: 40px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const ListIcon = styled(CgFileAdd)`
|
export const ListIcon = styled(CgFileAdd)`
|
||||||
color: ${({theme})=> theme.colors.textB2};
|
color: ${({ theme }) => theme.colors.textB2};
|
||||||
font-size: 50px;
|
font-size: 40px;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Text, View } from 'react-native'
|
import { Text, TouchableOpacity, View } from 'react-native'
|
||||||
import styled, { css } from 'styled-components'
|
import styled, { css } from 'styled-components'
|
||||||
import { MdClose } from 'react-icons/md'
|
import { MdClose } from 'react-icons/md'
|
||||||
import { BiEditAlt } from 'react-icons/bi'
|
import { BiEditAlt } from 'react-icons/bi'
|
||||||
@@ -15,10 +15,7 @@ export const Wrapper = styled(View)`
|
|||||||
border-bottom-width: 3px;
|
border-bottom-width: 3px;
|
||||||
/* border-radius: 15px; */
|
/* border-radius: 15px; */
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 768px;
|
width: 100%;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const ListSizeWrapper = styled(View)`
|
export const ListSizeWrapper = styled(View)`
|
||||||
height: ${(props) => props.visible ? props.height + 'px' : css`0px`};
|
height: ${(props) => props.visible ? props.height + 'px' : css`0px`};
|
||||||
@@ -32,7 +29,7 @@ export const WrapperList = styled(View)`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
`
|
`
|
||||||
export const WrapperListTitle = styled(View)`
|
export const WrapperListTitle = styled(TouchableOpacity)`
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 60px;
|
min-height: 60px;
|
||||||
@@ -40,26 +37,25 @@ export const WrapperListTitle = styled(View)`
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
#left {
|
`
|
||||||
display: flex;
|
export const WrapperLeft = styled(View)`
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
width: 50%;
|
flex-direction: column;
|
||||||
}
|
width: 50%;
|
||||||
#right {
|
`
|
||||||
width: 50%;
|
export const WrapperRight = styled(View)`
|
||||||
display: flex;
|
width: 50%;
|
||||||
align-items: flex-start;
|
display: flex;
|
||||||
justify-content: flex-end;
|
align-items: flex-start;
|
||||||
flex-direction: row;
|
justify-content: flex-end;
|
||||||
}
|
flex-direction: row;
|
||||||
|
|
||||||
`
|
`
|
||||||
export const ListTitle = styled(Text)`
|
export const ListTitle = styled(Text)`
|
||||||
overflow-wrap: break-word;
|
/* overflow-wrap: break-word; */
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
`
|
`
|
||||||
export const ListSubtitle = styled(Text)`
|
export const ListSubtitle = styled(Text)`
|
||||||
overflow-wrap: break-word;
|
/* overflow-wrap: break-word; */
|
||||||
color: ${({ theme }) => theme.colors.textB5};
|
color: ${({ theme }) => theme.colors.textB5};
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -5,10 +5,8 @@ export const Wrapper = styled(View)`
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
width: 768px;
|
justify-content: flex-start;
|
||||||
@media ${({ theme }) => theme.mediaQueries.below768}{
|
width: 100%;
|
||||||
width: 100vw;
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const DarkLayer = styled(View)`
|
export const DarkLayer = styled(View)`
|
||||||
background-color: ${({ theme }) => theme.colors.dp00};
|
background-color: ${({ theme }) => theme.colors.dp00};
|
||||||
@@ -22,18 +20,15 @@ export const DarkLayer = styled(View)`
|
|||||||
export const WrapperItem = styled(View)`
|
export const WrapperItem = styled(View)`
|
||||||
box-shadow: ${({ theme }) => theme.colors.shadow};
|
box-shadow: ${({ theme }) => theme.colors.shadow};
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
|
||||||
min-height: ${props => props.person ? css`60px` : css`30px`};
|
min-height: ${props => props.person ? css`60px` : css`30px`};
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
|
||||||
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '66'};
|
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '66'};
|
||||||
&:hover{
|
|
||||||
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '77'};
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
export const WrapperButton = styled(View)`
|
export const WrapperButton = styled(View)`
|
||||||
height: 30px;
|
height: 30px;
|
||||||
@@ -41,7 +36,7 @@ export const WrapperButton = styled(View)`
|
|||||||
`
|
`
|
||||||
export const TextProductName = styled(Text)`
|
export const TextProductName = styled(Text)`
|
||||||
/* word-wrap: break-word; */
|
/* word-wrap: break-word; */
|
||||||
word-break: break-all;
|
/* word-break: break-all; */
|
||||||
margin: 2px 0px 0px 8px;
|
margin: 2px 0px 0px 8px;
|
||||||
|
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
@@ -50,7 +45,7 @@ export const TextProductName = styled(Text)`
|
|||||||
color: ${props => props.theme.colors.textW1};
|
color: ${props => props.theme.colors.textW1};
|
||||||
`
|
`
|
||||||
export const TextDetails = styled(Text)`
|
export const TextDetails = styled(Text)`
|
||||||
word-wrap: break-word;
|
/* word-wrap: break-word; */
|
||||||
margin: 2px 0px 3px 8px;
|
margin: 2px 0px 3px 8px;
|
||||||
|
|
||||||
max-width: 65%;
|
max-width: 65%;
|
||||||
@@ -62,10 +57,10 @@ export const TextAmount = styled(Text)`
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
max-height: 30px;
|
max-height: 30px;
|
||||||
word-wrap: break-word;
|
/* word-wrap: break-word; */
|
||||||
text-overflow: ellipsis;
|
/* text-overflow: ellipsis; */
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
white-space:nowrap;
|
/* white-space:nowrap; */
|
||||||
right: 0px;
|
right: 0px;
|
||||||
margin: 3px 3px 3px 3px;
|
margin: 3px 3px 3px 3px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -78,11 +73,11 @@ export const TextAmount = styled(Text)`
|
|||||||
`
|
`
|
||||||
export const TextPerson = styled(Text)`
|
export const TextPerson = styled(Text)`
|
||||||
position: absolute;
|
position: absolute;
|
||||||
word-wrap: break-word;
|
/* word-wrap: break-word; */
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
text-overflow: ellipsis;
|
/* text-overflow: ellipsis; */
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
white-space:nowrap;
|
/* white-space:nowrap; */
|
||||||
right: 0px;
|
right: 0px;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const ListedProduct = React.memo((props) => {
|
|||||||
</WrapperProduct>
|
</WrapperProduct>
|
||||||
<WrapperButton onClick={()=>dispatch(checkToggle(product._id))} >
|
<WrapperButton onClick={()=>dispatch(checkToggle(product._id))} >
|
||||||
<CheckButton checked={product.checked}>
|
<CheckButton checked={product.checked}>
|
||||||
<IconCheck checked={product.checked} />
|
{/* <IconCheck checked={product.checked} /> */}
|
||||||
</CheckButton>
|
</CheckButton>
|
||||||
</WrapperButton>
|
</WrapperButton>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const UploadProductsButton = (props) => {
|
|||||||
<UploadInput type="file"
|
<UploadInput type="file"
|
||||||
onChange={evt => openFile(evt)}
|
onChange={evt => openFile(evt)}
|
||||||
multiple={false} />
|
multiple={false} />
|
||||||
<UploadIcon />
|
{/* <UploadIcon /> */}
|
||||||
</WrapperUpload>
|
</WrapperUpload>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ const DownloadProductsButton = (props) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WrapperDownload toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
<WrapperDownload toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
||||||
<DownloadIcon />
|
{/* <DownloadIcon /> */}
|
||||||
</WrapperDownload>
|
</WrapperDownload>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ const RemoveProductsButton = (props) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WrapperRemove toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
<WrapperRemove toggle={toggleAnim} visible={props.visible} onClick={handlePress}>
|
||||||
<RemoveIcon />
|
{/* <RemoveIcon /> */}
|
||||||
</WrapperRemove>
|
</WrapperRemove>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ export const ContainerButtons = (props) => {
|
|||||||
<DownloadProductsButton visible={visible} />
|
<DownloadProductsButton visible={visible} />
|
||||||
<RemoveProductsButton visible={visible} />
|
<RemoveProductsButton visible={visible} />
|
||||||
<WrapperButtons toggle={visible} onClick={() => setVisible(!visible)}>
|
<WrapperButtons toggle={visible} onClick={() => setVisible(!visible)}>
|
||||||
<MenuIcon />
|
{/* <MenuIcon /> */}
|
||||||
</WrapperButtons >
|
</WrapperButtons >
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
@@ -80,7 +80,7 @@ export const AddProductButton = (props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WrapperAddProduct toggle={visible} onClick={() => setVisible(true)}>
|
<WrapperAddProduct toggle={visible} onClick={() => setVisible(true)}>
|
||||||
<PlusIcon />
|
{/* <PlusIcon /> */}
|
||||||
</WrapperAddProduct>
|
</WrapperAddProduct>
|
||||||
<ModalAddProduct visible={visible} closeModal={closeModal} />
|
<ModalAddProduct visible={visible} closeModal={closeModal} />
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ export const WrapperProduct = styled(View)`
|
|||||||
margin-left: 7px;
|
margin-left: 7px;
|
||||||
|
|
||||||
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '66'};
|
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '66'};
|
||||||
&:hover{
|
|
||||||
background-color: ${props => props.checked ? props.theme.colors.itemSelected : props.color + '77'};
|
|
||||||
}
|
|
||||||
|
|
||||||
`
|
`
|
||||||
export const WrapperButton = styled(View)`
|
export const WrapperButton = styled(View)`
|
||||||
height: 60px;
|
height: 60px;
|
||||||
@@ -47,9 +43,6 @@ export const CheckButton = styled(View)`
|
|||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
margin: 0px 5px ;
|
margin: 0px 5px ;
|
||||||
background-color: ${props => props.checked ? props.theme.colors.selected : props.theme.colors.buttonGrey};
|
background-color: ${props => props.checked ? props.theme.colors.selected : props.theme.colors.buttonGrey};
|
||||||
&:hover{
|
|
||||||
background-color: ${props => props.checked ? props.theme.colors.selected : LightenDarken(props.theme.colors.buttonGrey, 5)}
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
|
|
||||||
export const WrapperText = styled(View)`
|
export const WrapperText = styled(View)`
|
||||||
@@ -60,20 +53,20 @@ export const WrapperText = styled(View)`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
export const TextProductName = styled(Text)`
|
export const TextProductName = styled(Text)`
|
||||||
word-wrap: break-word;
|
/* word-wrap: break-word; */
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
margin: 0px 0px 0px 5px;
|
margin: 0px 0px 0px 5px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: ${props => props.theme.colors.textW1};
|
color: ${props => props.theme.colors.textW1};
|
||||||
`
|
`
|
||||||
export const TextTag = styled(Text)`
|
export const TextTag = styled(Text)`
|
||||||
word-wrap: break-word;
|
/* word-wrap: break-word; */
|
||||||
margin: 2px 0px 0px 5px;
|
margin: 2px 0px 0px 5px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: ${props => LightenDarken(props.color,-30)};
|
color: ${props => LightenDarken(props.color,-30)};
|
||||||
`
|
`
|
||||||
export const TextPrice = styled(Text)`
|
export const TextPrice = styled(Text)`
|
||||||
word-wrap: break-word;
|
/* word-wrap: break-word; */
|
||||||
margin: 0px 6px 3px 3px;
|
margin: 0px 6px 3px 3px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export const WrapperSelected = styled(View)`
|
|||||||
width: 125px;
|
width: 125px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border-radius:25px;
|
border-radius:25px;
|
||||||
//anims
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.currenttab === 'Groceries'
|
props.currenttab === 'Groceries'
|
||||||
? css`
|
? css`
|
||||||
@@ -55,9 +54,6 @@ export const WrapperSelected = styled(View)`
|
|||||||
export const WrapperGroceries = styled(WrapperIcon)`
|
export const WrapperGroceries = styled(WrapperIcon)`
|
||||||
flex:1;
|
flex:1;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
/* &:hover{
|
|
||||||
background-color: #fffa;
|
|
||||||
} */
|
|
||||||
`
|
`
|
||||||
export const IconGroceries = styled(RiShoppingBasketLine)`
|
export const IconGroceries = styled(RiShoppingBasketLine)`
|
||||||
font-size: ${iconSize};
|
font-size: ${iconSize};
|
||||||
@@ -71,9 +67,6 @@ export const IconGroceries = styled(RiShoppingBasketLine)`
|
|||||||
export const WrapperProducts = styled(WrapperIcon)`
|
export const WrapperProducts = styled(WrapperIcon)`
|
||||||
flex:1;
|
flex:1;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
/* &:hover{
|
|
||||||
background-color: #fff4;
|
|
||||||
} */
|
|
||||||
|
|
||||||
`
|
`
|
||||||
export const IconProducts = styled(FaAppleAlt)`
|
export const IconProducts = styled(FaAppleAlt)`
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ const ModalAddItem = (props) => {
|
|||||||
am: amount ? Number(amount) : 1,
|
am: amount ? Number(amount) : 1,
|
||||||
qt: qt
|
qt: qt
|
||||||
}
|
}
|
||||||
console.log(amountObj)
|
|
||||||
let listId = lists.find((list) => list.open === true)._id
|
let listId = lists.find((list) => list.open === true)._id
|
||||||
if (tags.find(t => t.tagName === tag)) {
|
if (tags.find(t => t.tagName === tag)) {
|
||||||
dispatch(itemAdded({ productName, amount: amountObj, person, details, tag, price, listId }));
|
dispatch(itemAdded({ productName, amount: amountObj, person, details, tag, price, listId }));
|
||||||
@@ -65,7 +64,7 @@ const ModalAddItem = (props) => {
|
|||||||
setPrice(product.price)
|
setPrice(product.price)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} >
|
||||||
<ModalHeader>Add product</ModalHeader>
|
<ModalHeader>Add product</ModalHeader>
|
||||||
{/* {product && product.image && <Image src={product.image} />} */}
|
{/* {product && product.image && <Image src={product.image} />} */}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
@@ -75,19 +74,19 @@ const ModalAddItem = (props) => {
|
|||||||
value={productName}
|
value={productName}
|
||||||
onChange={(text) => setProductName(text.target.value)}
|
onChange={(text) => setProductName(text.target.value)}
|
||||||
placeholder="Product name" />
|
placeholder="Product name" />
|
||||||
{productName ? <IconCheck /> : <IconWrong />}
|
{/* {productName ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
{focusedProduct && <WrapperDropdown>
|
{focusedProduct && <WrapperDropdown>
|
||||||
<Dropdown array={products.map(product => product.productName)} text={productName} setElement={handleDropdownPress} />
|
<Dropdown array={products.map(product => product.productName)} text={productName} setElement={handleDropdownPress} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconAmount />
|
{/* <IconAmount /> */}
|
||||||
<Input style={{ width: '69%' }}
|
<Input style={{ width: '69%' }}
|
||||||
type="number"
|
type="number"
|
||||||
value={amount}
|
value={amount}
|
||||||
onChange={(text) => setAmount(text.target.value)}
|
onChange={(text) => setAmount(text.target.value)}
|
||||||
placeholder="Amount" />
|
placeholder="Amount" />
|
||||||
{amount ? <IconCheck /> : <IconWrong />}
|
{/* {amount ? <IconCheck /> : <IconWrong />} */}
|
||||||
<InputSmall style={{ marginLeft: "1%", width: '10%' }}
|
<InputSmall style={{ marginLeft: "1%", width: '10%' }}
|
||||||
onFocus={() => setFocusedQt(true)} onBlur={() => { setTimeout(() => { setFocusedQt(false) }, 100) }}
|
onFocus={() => setFocusedQt(true)} onBlur={() => { setTimeout(() => { setFocusedQt(false) }, 100) }}
|
||||||
type="text"
|
type="text"
|
||||||
@@ -99,21 +98,21 @@ const ModalAddItem = (props) => {
|
|||||||
<QtDropdown text={qt} setElement={setQt} />
|
<QtDropdown text={qt} setElement={setQt} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconPerson />
|
{/* <IconPerson /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={person}
|
value={person}
|
||||||
onChange={(text) => setPerson(text.target.value)}
|
onChange={(text) => setPerson(text.target.value)}
|
||||||
placeholder="For" />
|
placeholder="For" />
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconDetails />
|
{/* <IconDetails /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={details}
|
value={details}
|
||||||
onChange={(text) => setDetails(text.target.value)}
|
onChange={(text) => setDetails(text.target.value)}
|
||||||
placeholder="Additional details" />
|
placeholder="Additional details" />
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconTag />
|
{/* <IconTag /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
onFocus={() => setFocusedTag(true)} onBlur={() => { setTimeout(() => { setFocusedTag(false) }, 100) }}
|
onFocus={() => setFocusedTag(true)} onBlur={() => { setTimeout(() => { setFocusedTag(false) }, 100) }}
|
||||||
value={tag}
|
value={tag}
|
||||||
@@ -124,7 +123,7 @@ const ModalAddItem = (props) => {
|
|||||||
<Dropdown array={tags.map(tag => tag.tagName)} text={tag} setElement={setTag} />
|
<Dropdown array={tags.map(tag => tag.tagName)} text={tag} setElement={setTag} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconDollar />
|
{/* <IconDollar /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={price}
|
value={price}
|
||||||
onChange={(text) => setPrice(text.target.value)}
|
onChange={(text) => setPrice(text.target.value)}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const ModalAddList = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={props.closeModal}>
|
||||||
<ModalHeader>Add a grocery list</ModalHeader>
|
<ModalHeader>Add a grocery list</ModalHeader>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<Input
|
<Input
|
||||||
@@ -35,7 +35,7 @@ const ModalAddList = (props) => {
|
|||||||
onChange={(text) => setListName(text.target.value)}
|
onChange={(text) => setListName(text.target.value)}
|
||||||
// onKeyDown={(event) => handleKeyDown(event)}
|
// onKeyDown={(event) => handleKeyDown(event)}
|
||||||
placeholder="List name" />
|
placeholder="List name" />
|
||||||
{listName ? <IconCheck /> : <IconWrong />}
|
{/* {listName ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
|
|||||||
@@ -42,38 +42,38 @@ export const ModalAddProduct = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} >
|
||||||
<ModalHeader>Add product</ModalHeader>
|
<ModalHeader>Add product</ModalHeader>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconProduct />
|
{/* <IconProduct /> */}
|
||||||
<InputSmall type="text"
|
<InputSmall type="text"
|
||||||
value={productName}
|
value={productName}
|
||||||
onChange={(text) => setProductName(text.target.value)}
|
onChange={(text) => setProductName(text.target.value)}
|
||||||
// onKeyDown={(event) => handleKeyDown(event)}
|
// onKeyDown={(event) => handleKeyDown(event)}
|
||||||
placeholder="Product name" />
|
placeholder="Product name" />
|
||||||
{productName ? <IconCheck /> : <IconWrong />}
|
{/* {productName ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconTag />
|
{/* <IconTag /> */}
|
||||||
<InputSmall onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
|
<InputSmall onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
|
||||||
type="text"
|
type="text"
|
||||||
value={tag}
|
value={tag}
|
||||||
onChange={(text) => setTag(text.target.value)}
|
onChange={(text) => setTag(text.target.value)}
|
||||||
placeholder="Tag" />
|
placeholder="Tag" />
|
||||||
{tag ? <IconCheck /> : <IconWrong />}
|
{/* {tag ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
{focused && <WrapperDropdown>
|
{focused && <WrapperDropdown>
|
||||||
<Dropdown array={tags.map(tag => tag.tagName)} text={tag} setElement={setTag} />
|
<Dropdown array={tags.map(tag => tag.tagName)} text={tag} setElement={setTag} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconDollar />
|
{/* <IconDollar /> */}
|
||||||
<InputSmall type="number"
|
<InputSmall type="number"
|
||||||
value={price}
|
value={price}
|
||||||
onChange={(text) => setPrice(text.target.value)}
|
onChange={(text) => setPrice(text.target.value)}
|
||||||
placeholder="Price" />
|
placeholder="Price" />
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconLink />
|
{/* <IconLink /> */}
|
||||||
<InputSmall type="text"
|
<InputSmall type="text"
|
||||||
value={image}
|
value={image}
|
||||||
onChange={(text) => setImage(text.target.value)}
|
onChange={(text) => setImage(text.target.value)}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const ModalEditItem = (props) => {
|
|||||||
props.setVisible(false)
|
props.setVisible(false)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={closeModal} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={closeModal} >
|
||||||
<WrapperProduct color={tagState.color}>
|
<WrapperProduct color={tagState.color}>
|
||||||
{product && product.image && <StyledImage src={product.image} />}
|
{product && product.image && <StyledImage src={product.image} />}
|
||||||
<WrapperProductInfo>
|
<WrapperProductInfo>
|
||||||
@@ -70,26 +70,26 @@ const ModalEditItem = (props) => {
|
|||||||
</WrapperProductInfo>
|
</WrapperProductInfo>
|
||||||
</WrapperProduct>
|
</WrapperProduct>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconProduct />
|
{/* <IconProduct /> */}
|
||||||
<Input onFocus={() => setFocusedProduct(true)} onBlur={() => { setTimeout(() => { setFocusedProduct(false) }, 100) }}
|
<Input onFocus={() => setFocusedProduct(true)} onBlur={() => { setTimeout(() => { setFocusedProduct(false) }, 100) }}
|
||||||
type="text"
|
type="text"
|
||||||
value={productName}
|
value={productName}
|
||||||
onChange={(text) => setProductName(text.target.value)}
|
onChange={(text) => setProductName(text.target.value)}
|
||||||
// onKeyDown={(event) => handleKeyDown(event)}
|
// onKeyDown={(event) => handleKeyDown(event)}
|
||||||
placeholder="Product name" />
|
placeholder="Product name" />
|
||||||
{productName ? <IconCheck /> : <IconWrong />}
|
{/* {productName ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
{focusedProduct && <WrapperDropdown>
|
{focusedProduct && <WrapperDropdown>
|
||||||
<Dropdown array={products.map(product => product.productName)} text={productName} setElement={handleDropdownPress} />
|
<Dropdown array={products.map(product => product.productName)} text={productName} setElement={handleDropdownPress} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconAmount />
|
{/* <IconAmount /> */}
|
||||||
<Input style={{ width: '67%' }}
|
<Input style={{ width: '67%' }}
|
||||||
type="number"
|
type="number"
|
||||||
value={amount}
|
value={amount}
|
||||||
onChange={(text) => setAmount(text.target.value)}
|
onChange={(text) => setAmount(text.target.value)}
|
||||||
placeholder="Amount" />
|
placeholder="Amount" />
|
||||||
{amount ? <IconCheck /> : <IconWrong />}
|
{/* {amount ? <IconCheck /> : <IconWrong />} */}
|
||||||
<InputSmall style={{ marginLeft: "1%", width: '10%' }}
|
<InputSmall style={{ marginLeft: "1%", width: '10%' }}
|
||||||
onFocus={() => setFocusedQt(true)} onBlur={() => { setTimeout(() => { setFocusedQt(false) }, 100) }}
|
onFocus={() => setFocusedQt(true)} onBlur={() => { setTimeout(() => { setFocusedQt(false) }, 100) }}
|
||||||
type="text"
|
type="text"
|
||||||
@@ -101,21 +101,21 @@ const ModalEditItem = (props) => {
|
|||||||
<QtDropdown text={qt} setElement={setQt} />
|
<QtDropdown text={qt} setElement={setQt} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconPerson />
|
{/* <IconPerson /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={person}
|
value={person}
|
||||||
onChange={(text) => setPerson(text.target.value)}
|
onChange={(text) => setPerson(text.target.value)}
|
||||||
placeholder="For" />
|
placeholder="For" />
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconDetails />
|
{/* <IconDetails /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={details}
|
value={details}
|
||||||
onChange={(text) => setDetails(text.target.value)}
|
onChange={(text) => setDetails(text.target.value)}
|
||||||
placeholder="Additional details" />
|
placeholder="Additional details" />
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconTag />
|
{/* <IconTag /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
onFocus={() => setFocusedTag(true)} onBlur={() => { setTimeout(() => { setFocusedTag(false) }, 100) }}
|
onFocus={() => setFocusedTag(true)} onBlur={() => { setTimeout(() => { setFocusedTag(false) }, 100) }}
|
||||||
value={tag}
|
value={tag}
|
||||||
@@ -126,7 +126,7 @@ const ModalEditItem = (props) => {
|
|||||||
<Dropdown array={tags.map(t => t.tagName)} text={tag} setElement={setTag} />
|
<Dropdown array={tags.map(t => t.tagName)} text={tag} setElement={setTag} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconDollar />
|
{/* <IconDollar /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={price}
|
value={price}
|
||||||
onChange={(text) => setPrice(text.target.value)}
|
onChange={(text) => setPrice(text.target.value)}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const ModalEditList = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={() => props.setVisible(false)} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={() => props.setVisible(false)}>
|
||||||
<ModalHeader>Edit the list</ModalHeader>
|
<ModalHeader>Edit the list</ModalHeader>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const ModalEditProduct = (props) => {
|
|||||||
props.setVisible(false)
|
props.setVisible(false)
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={closeModal} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={closeModal} >
|
||||||
<WrapperProduct color={usedTag.color}>
|
<WrapperProduct color={usedTag.color}>
|
||||||
{image && <StyledImage src={image} alt="No image found" />}
|
{image && <StyledImage src={image} alt="No image found" />}
|
||||||
<WrapperProductInfo>
|
<WrapperProductInfo>
|
||||||
@@ -55,35 +55,35 @@ const ModalEditProduct = (props) => {
|
|||||||
</WrapperProductInfo>
|
</WrapperProductInfo>
|
||||||
</WrapperProduct>
|
</WrapperProduct>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconProduct />
|
{/* <IconProduct /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={productName}
|
value={productName}
|
||||||
onChange={(text) => setProductName(text.target.value)}
|
onChange={(text) => setProductName(text.target.value)}
|
||||||
// onKeyDown={(event) => handleKeyDown(event)}
|
// onKeyDown={(event) => handleKeyDown(event)}
|
||||||
placeholder="Product name" />
|
placeholder="Product name" />
|
||||||
{productName ? <IconCheck /> : <IconWrong />}
|
{/* {productName ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconTag />
|
{/* <IconTag /> */}
|
||||||
<Input onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
|
<Input onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
|
||||||
type="text"
|
type="text"
|
||||||
value={tag}
|
value={tag}
|
||||||
onChange={(text) => setTag(text.target.value)}
|
onChange={(text) => setTag(text.target.value)}
|
||||||
placeholder="Tag" />
|
placeholder="Tag" />
|
||||||
{tag ? <IconCheck /> : <IconWrong />}
|
{/* {tag ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
{focused && <WrapperDropdown>
|
{focused && <WrapperDropdown>
|
||||||
<Dropdown array={tags.map(tag => tag.tagName)} text={tag} setElement={setTag} />
|
<Dropdown array={tags.map(tag => tag.tagName)} text={tag} setElement={setTag} />
|
||||||
</WrapperDropdown>}
|
</WrapperDropdown>}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconDollar />
|
{/* <IconDollar /> */}
|
||||||
<Input type="number"
|
<Input type="number"
|
||||||
value={price}
|
value={price}
|
||||||
onChange={(text) => setPrice(text.target.value)}
|
onChange={(text) => setPrice(text.target.value)}
|
||||||
placeholder="Price" />
|
placeholder="Price" />
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconLink />
|
{/* <IconLink /> */}
|
||||||
<Input type="text"
|
<Input type="text"
|
||||||
value={image}
|
value={image}
|
||||||
onChange={(text) => setImage(text.target.value)}
|
onChange={(text) => setImage(text.target.value)}
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ const ModalAddIngredients = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} animation={false}>
|
<StyledModal show={props.visible} centered={true} onHide={props.closeModal} >
|
||||||
<ModalHeader>Add to grocerylist</ModalHeader>
|
<ModalHeader>Add to grocerylist</ModalHeader>
|
||||||
<ModalDescription>Choose a grocery list and select the ingredients you would like to add to it</ModalDescription>
|
<ModalDescription>Choose a grocery list and select the ingredients you would like to add to it</ModalDescription>
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconList />
|
{/* <IconList /> */}
|
||||||
<Input
|
<Input
|
||||||
style={{ fontSize: 20 }}
|
style={{ fontSize: 20 }}
|
||||||
type="text"
|
type="text"
|
||||||
@@ -74,14 +74,14 @@ const ModalAddIngredients = (props) => {
|
|||||||
onChange={(text) => setListName(text.target.value)}
|
onChange={(text) => setListName(text.target.value)}
|
||||||
onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
|
onFocus={() => setFocused(true)} onBlur={() => { setTimeout(() => { setFocused(false) }, 100) }}
|
||||||
placeholder="Grocery list" />
|
placeholder="Grocery list" />
|
||||||
{listName ? <IconCheck /> : <IconWrong />}
|
{/* {listName ? <IconCheck /> : <IconWrong />} */}
|
||||||
</WrapperInput>
|
</WrapperInput>
|
||||||
{focused && <WrapperDropdown>
|
{focused && <WrapperDropdown>
|
||||||
<Dropdown array={lists.map(list => list.listName)} text={listName} setElement={setListName} />
|
<Dropdown array={lists.map(list => list.listName)} text={listName} setElement={setListName} />
|
||||||
</WrapperDropdown>
|
</WrapperDropdown>
|
||||||
}
|
}
|
||||||
<WrapperInput>
|
<WrapperInput>
|
||||||
<IconMeal />
|
{/* <IconMeal /> */}
|
||||||
<Input
|
<Input
|
||||||
style={{ fontSize: 20, width: 100 }}
|
style={{ fontSize: 20, width: 100 }}
|
||||||
type="number"
|
type="number"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export const AddRecipeButton = () => {
|
|||||||
return (
|
return (
|
||||||
// < Link to="/recipes/addRecipe">
|
// < Link to="/recipes/addRecipe">
|
||||||
<WrapperAddRecipe>
|
<WrapperAddRecipe>
|
||||||
<IconPlus />
|
{/* <IconPlus /> */}
|
||||||
</WrapperAddRecipe>
|
</WrapperAddRecipe>
|
||||||
// </Link>
|
// </Link>
|
||||||
)
|
)
|
||||||
@@ -24,7 +24,7 @@ export const AddIngredientsButton = (props) => {
|
|||||||
const [visible, setVisible] = useState(false)
|
const [visible, setVisible] = useState(false)
|
||||||
return (<>
|
return (<>
|
||||||
<WrapperAddItem style={{ bottom: 10 }} onClick={()=>setVisible(true)}>
|
<WrapperAddItem style={{ bottom: 10 }} onClick={()=>setVisible(true)}>
|
||||||
<PlusIcon />
|
{/* <PlusIcon /> */}
|
||||||
</WrapperAddItem>
|
</WrapperAddItem>
|
||||||
<ModalAddIngredients id={props.id} visible={visible} closeModal={() => setVisible(false)} />
|
<ModalAddIngredients id={props.id} visible={visible} closeModal={() => setVisible(false)} />
|
||||||
</>
|
</>
|
||||||
@@ -41,9 +41,9 @@ export const OptionsButtonRecipe = (props) => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<WrapperOptions toggled={toggled} >
|
<WrapperOptions toggled={toggled} >
|
||||||
<IconOptions toggled={toggled} onClick={() => setToggled(!toggled)} />
|
{/* <IconOptions toggled={toggled} onClick={() => setToggled(!toggled)} /> */}
|
||||||
<WrapperOptionButtons toggled={toggled}>
|
<WrapperOptionButtons toggled={toggled}>
|
||||||
<IconRemove onClick={() => handleRemove()} />
|
{/* <IconRemove onClick={() => handleRemove()} /> */}
|
||||||
{/* <IconEdit onClick={() => history.push("/recipes/addRecipe/" + props.id)} /> */}
|
{/* <IconEdit onClick={() => history.push("/recipes/addRecipe/" + props.id)} /> */}
|
||||||
</WrapperOptionButtons>
|
</WrapperOptionButtons>
|
||||||
</WrapperOptions>
|
</WrapperOptions>
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export const Ingredient = (props) => {
|
|||||||
<IngredientName>{ingredient.productName}</IngredientName>
|
<IngredientName>{ingredient.productName}</IngredientName>
|
||||||
</View>
|
</View>
|
||||||
<IngredientAmount>{ingredient.amount*multiplier}</IngredientAmount>
|
<IngredientAmount>{ingredient.amount*multiplier}</IngredientAmount>
|
||||||
{props.EditIngredient && <IconEdit onClick={() => props.EditIngredient(props.index)} />}
|
{/* {props.EditIngredient && <IconEdit onClick={() => props.EditIngredient(props.index)} />} */}
|
||||||
{props.RemoveIngredient && <IconRemove onClick={() => props.RemoveIngredient(props.index)} />}
|
{/* {props.RemoveIngredient && <IconRemove onClick={() => props.RemoveIngredient(props.index)} />} */}
|
||||||
</WrapperIngredient>
|
</WrapperIngredient>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -29,22 +29,22 @@ export const IngredientName = styled(Text)`
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
font-size: ${({ theme }) => theme.fontSize.fontS};
|
font-size: ${({ theme }) => theme.fontSize.fontS};
|
||||||
overflow-wrap: break-word;
|
/* overflow-wrap: break-word; */
|
||||||
color: ${props => props.theme.colors.textW4};
|
color: ${props => props.theme.colors.textW4};
|
||||||
`
|
`
|
||||||
export const IngredientPortion = styled(Text)`
|
export const IngredientPortion = styled(Text)`
|
||||||
width: 35%;
|
width: 35%;
|
||||||
font-size: ${({ theme }) => theme.fontSize.fontS};
|
font-size: ${({ theme }) => theme.fontSize.fontS};
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
word-break: break-all;
|
/* word-break: break-all; */
|
||||||
overflow-wrap: break-word;
|
/* overflow-wrap: break-word; */
|
||||||
color: ${props => props.theme.colors.textW5};
|
color: ${props => props.theme.colors.textW5};
|
||||||
`
|
`
|
||||||
export const IngredientAmount = styled(Text)`
|
export const IngredientAmount = styled(Text)`
|
||||||
max-width: 12%;
|
max-width: 12%;
|
||||||
margin-right: 48px;
|
margin-right: 48px;
|
||||||
font-size: ${({theme}) => theme.fontSize.fontS};
|
font-size: ${({theme}) => theme.fontSize.fontS};
|
||||||
overflow-wrap: break-word;
|
/* overflow-wrap: break-word; */
|
||||||
color: ${props => props.theme.colors.textW5};
|
color: ${props => props.theme.colors.textW5};
|
||||||
`
|
`
|
||||||
export const IconRemove = styled(GoTrashcan)`
|
export const IconRemove = styled(GoTrashcan)`
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { View } from 'react-native'
|
import { ScrollView, View } from 'react-native'
|
||||||
import HeaderPadding from '../components/Header'
|
import HeaderPadding from '../components/Header'
|
||||||
|
|
||||||
//components
|
//components
|
||||||
@@ -13,7 +13,7 @@ import { Wrapper, WrapperBoard, WrapperRight, WrapperLeft } from './styles/HomeP
|
|||||||
|
|
||||||
const HomePage = () => {
|
const HomePage = () => {
|
||||||
return (
|
return (
|
||||||
<View style={{flex: 1}}>
|
<ScrollView>
|
||||||
<HeaderPadding/>
|
<HeaderPadding/>
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<WrapperBoard>
|
<WrapperBoard>
|
||||||
@@ -25,7 +25,7 @@ const HomePage = () => {
|
|||||||
</WrapperRight>
|
</WrapperRight>
|
||||||
</WrapperBoard>
|
</WrapperBoard>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</View>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const GroceryListPage = () => {
|
|||||||
{
|
{
|
||||||
currentTab === "Groceries" ? <Groceries /> : <Products />
|
currentTab === "Groceries" ? <Groceries /> : <Products />
|
||||||
}
|
}
|
||||||
<TabMenu currentTab={currentTab} setCurrentTab={setCurrentTab} />
|
{/* <TabMenu currentTab={currentTab} setCurrentTab={setCurrentTab} /> */}
|
||||||
</WrapperGroceryPage>
|
</WrapperGroceryPage>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const AddRecipe = () => {
|
|||||||
{image && <StyledImage src={image} alt="Recipe" />}
|
{image && <StyledImage src={image} alt="Recipe" />}
|
||||||
<WrapperRecipe>
|
<WrapperRecipe>
|
||||||
<View id="row">
|
<View id="row">
|
||||||
<IconRecipe />
|
{/* <IconRecipe /> */}
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
value={name}
|
value={name}
|
||||||
@@ -78,13 +78,13 @@ const AddRecipe = () => {
|
|||||||
placeholder="Recipe name" />
|
placeholder="Recipe name" />
|
||||||
</View>
|
</View>
|
||||||
<View id="row">
|
<View id="row">
|
||||||
<IconPot />
|
{/* <IconPot /> */}
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
value={prepTime}
|
value={prepTime}
|
||||||
onChange={(text) => setPrepTime(text.target.value)}
|
onChange={(text) => setPrepTime(text.target.value)}
|
||||||
placeholder="Prep time (min)" />
|
placeholder="Prep time (min)" />
|
||||||
<IconMeal />
|
{/* <IconMeal /> */}
|
||||||
<Input
|
<Input
|
||||||
type="number"
|
type="number"
|
||||||
value={servings}
|
value={servings}
|
||||||
@@ -92,7 +92,7 @@ const AddRecipe = () => {
|
|||||||
placeholder="Servings" />
|
placeholder="Servings" />
|
||||||
</View>
|
</View>
|
||||||
<View id="row">
|
<View id="row">
|
||||||
<IconImage />
|
{/* <IconImage /> */}
|
||||||
<Input
|
<Input
|
||||||
style={{ borderBottom: 'none' }}
|
style={{ borderBottom: 'none' }}
|
||||||
type="file" accept="image/*"
|
type="file" accept="image/*"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const Recipe = () => {
|
|||||||
<Hr />
|
<Hr />
|
||||||
{recipe.prepTime !== 0 && recipe.prepTime && <>
|
{recipe.prepTime !== 0 && recipe.prepTime && <>
|
||||||
<View id="row" style={{ position: 'relative', marginTop: 0 }} >
|
<View id="row" style={{ position: 'relative', marginTop: 0 }} >
|
||||||
<IconPotLarge />
|
{/* <IconPotLarge /> */}
|
||||||
<TextPrep>READY IN:</TextPrep>
|
<TextPrep>READY IN:</TextPrep>
|
||||||
<View id="column" >
|
<View id="column" >
|
||||||
<TextTime>{recipe.prepTime}</TextTime>
|
<TextTime>{recipe.prepTime}</TextTime>
|
||||||
@@ -45,7 +45,7 @@ const Recipe = () => {
|
|||||||
</View>
|
</View>
|
||||||
{recipe.servings !== 0 && recipe.servings && <>
|
{recipe.servings !== 0 && recipe.servings && <>
|
||||||
<WrapperServings>
|
<WrapperServings>
|
||||||
<IconMeal />
|
{/* <IconMeal /> */}
|
||||||
<View>
|
<View>
|
||||||
<TextTime>{recipe.servings}</TextTime>
|
<TextTime>{recipe.servings}</TextTime>
|
||||||
<TextServings>servings</TextServings>
|
<TextServings>servings</TextServings>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import React from 'react'
|
|||||||
import styled, { css } from 'styled-components'
|
import styled, { css } from 'styled-components'
|
||||||
//deps
|
//deps
|
||||||
import { HiCheck } from 'react-icons/hi'
|
import { HiCheck } from 'react-icons/hi'
|
||||||
//anims
|
|
||||||
|
|
||||||
import LightenDarken from '../functions'
|
import LightenDarken from '../functions'
|
||||||
//standard button layout
|
//standard button layout
|
||||||
@@ -31,9 +30,6 @@ const CheckButtonWrapper = styled(View)`
|
|||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
margin: 0px 5px ;
|
margin: 0px 5px ;
|
||||||
background-color: ${props => props.checked ? props.theme.colors.selected : props.theme.colors.buttonGrey};
|
background-color: ${props => props.checked ? props.theme.colors.selected : props.theme.colors.buttonGrey};
|
||||||
&:hover{
|
|
||||||
background-color: ${props => props.checked ? props.theme.colors.selected : LightenDarken(props.theme.colors.buttonGrey, 5)}
|
|
||||||
}
|
|
||||||
`
|
`
|
||||||
const IconCheck = styled(HiCheck)`
|
const IconCheck = styled(HiCheck)`
|
||||||
font-size: ${({ theme }) => theme.fontSize.fontL};
|
font-size: ${({ theme }) => theme.fontSize.fontL};
|
||||||
@@ -42,7 +38,7 @@ const IconCheck = styled(HiCheck)`
|
|||||||
export const CheckButton = (props) => {
|
export const CheckButton = (props) => {
|
||||||
return (
|
return (
|
||||||
<CheckButtonWrapper checked={props.checked} >
|
<CheckButtonWrapper checked={props.checked} >
|
||||||
<IconCheck checked={props.checked} />
|
{/* <IconCheck checked={props.checked} /> */}
|
||||||
</CheckButtonWrapper>
|
</CheckButtonWrapper>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user