fix: style matching bank transactions

This commit is contained in:
Ahmed Bouhuolia
2024-07-03 19:41:43 +02:00
parent a5eb42edaf
commit b8a0a5509d
14 changed files with 104 additions and 104 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { AppShellProvider, useAppShellContext } from './AppContentShellProvider';
import { Box, BoxProps } from '../../Layout';
import styles from './AppShell.module.scss';
import styles from './AppContentShell.module.scss';
interface AppContentShellProps {
topbarOffset?: number;

View File

@@ -0,0 +1,19 @@
.root{
display: flex;
flex-direction: row;
gap: 10px;
margin-bottom: 14px;
}
.tag{
min-height: 26px;
&:global(.bp4-minimal:not([class*='bp4-intent-'])) {
background: #fff;
border: 1px solid #e1e2e8;
&:global(.bp4-interactive:hover) {
background-color: rgba(143, 153, 168, 0.05);
}
}
}

View File

@@ -0,0 +1,42 @@
import { Tag } from '@blueprintjs/core';
import { useUncontrolled } from '@/hooks/useUncontrolled';
import { Box } from '../Layout';
import styles from './TagsControl.module.scss';
interface TagsControProps {
options: Array<{ label: string; value: string }>;
initialValue?: string;
value?: string;
onValueChange?: (value: string) => void;
}
export function TagsControl({
options,
initialValue,
value,
onValueChange,
}: TagsControProps) {
const [_value, handleChange] = useUncontrolled<string>({
initialValue,
value,
onChange: onValueChange,
finalValue: '',
});
return (
<Box className={styles.root}>
{options.map((option, index) => (
<Tag
key={index}
round
interactive
onClick={() => handleChange(option.value)}
minimal={option.value !== _value}
className={styles.tag}
>
{option.label}
</Tag>
))}
</Box>
);
}

View File

@@ -0,0 +1 @@
export * from './TagsControl';