Skip to content

Commit

Permalink
chore: update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
pregnantboy committed Dec 24, 2024
1 parent 8c961fa commit b973dac
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
10 changes: 7 additions & 3 deletions packages/backend/src/apps/tiles/actions/update-row/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,14 @@ const action: IRawAction = {
value: 'set',
options: [
{ label: '=', value: 'set', description: 'Set as' },
{ label: '+', value: 'add', description: 'Add by' },
{ label: '-', value: 'subtract', description: 'Subtract by' },
{ label: '+', value: 'add', description: 'Add by (numbers only)' },
{
label: '-',
value: 'subtract',
description: 'Subtract by (numbers only)',
},
],
customStyle: { flexBasis: '44px' },
customStyle: { flexBasis: '71px' },
},
{
placeholder: 'Value',
Expand Down
11 changes: 8 additions & 3 deletions packages/frontend/src/components/MultiCol.tsx/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { IFieldMultiRowMultiColSubField } from '@plumber/types'

import { BiTrash } from 'react-icons/bi'
import { Flex } from '@chakra-ui/react'
import { Flex, useBreakpointValue } from '@chakra-ui/react'
import { IconButton } from '@opengovsg/design-system-react'

import InputCreator from '@/components/InputCreator'
Expand All @@ -25,11 +25,16 @@ export default function MultiCol(props: MultiColProps) {
index,
...forwardedInputCreatorProps
} = props

const isMobile = useBreakpointValue({ base: true, sm: false })
return (
<Flex flexDir="row" gap={2}>
<Flex flexDir={isMobile ? 'column' : 'row'} gap={2}>
{subFields.map((subF) => {
return (
<div key={`${name}.${subF.key}`} style={subF.customStyle}>
<div
key={`${name}.${subF.key}`}
style={isMobile ? { flex: 1 } : subF.customStyle}
>
<InputCreator
schema={subF}
namePrefix={name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,7 @@ export const SelectCombobox = forwardRef<HTMLInputElement>(
direction="row"
spacing="1rem"
aria-disabled={isDisabled}
sx={{
...styles.selected,
...(!isSearchable && {
margin: 'auto',
pr: 0,
pl: 0,
}),
}}
sx={styles.selected}
aria-hidden
>
{selectedItemMeta.icon ? (
Expand Down Expand Up @@ -135,7 +128,7 @@ export const SelectCombobox = forwardRef<HTMLInputElement>(
'aria-expanded': !!isOpen,
})}
/>
{isSearchable && <ToggleChevron />}
<ToggleChevron />
</InputGroup>
<ComboboxClearButton />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const SelectMenu = (): JSX.Element => {
{ suppressRefError: true },
)}
style={floatingStyles}
sx={{ ...styles.list, minWidth: '150px' }}
sx={{ ...styles.list, minWidth: '230px' }}
zIndex="dropdown"
>
{isOpen && items.length > 0 && (
Expand Down

0 comments on commit b973dac

Please sign in to comment.