mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix: style matching bank transactions
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
42
packages/webapp/src/components/TagsControl/TagsControl.tsx
Normal file
42
packages/webapp/src/components/TagsControl/TagsControl.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
1
packages/webapp/src/components/TagsControl/index.ts
Normal file
1
packages/webapp/src/components/TagsControl/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './TagsControl';
|
||||
Reference in New Issue
Block a user