mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update components
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
import { Box, Text } from '..';
|
import { Box, Text } from '..';
|
||||||
import { Backend, Frontend } from '../../assets';
|
import { Backend, Frontend } from '../../assets';
|
||||||
import { FeatureOutput } from '../../graphql/types';
|
import { FeatureOutput } from '../../graphql/types';
|
||||||
|
import { theme } from '../../themes';
|
||||||
|
|
||||||
type FeatureCardProps = {
|
type FeatureCardProps = {
|
||||||
feature: FeatureOutput;
|
feature: FeatureOutput;
|
||||||
selectable?: boolean;
|
selectable?: boolean;
|
||||||
selected?: boolean;
|
selected?: boolean;
|
||||||
toggleSelect?: () => void;
|
toggleSelect?: () => void;
|
||||||
|
color?: 'client' | 'productOwner' | 'developer' | 'admin';
|
||||||
};
|
};
|
||||||
|
|
||||||
const FeatureCard = ({
|
const FeatureCard = ({
|
||||||
@@ -14,13 +16,18 @@ const FeatureCard = ({
|
|||||||
selectable = false,
|
selectable = false,
|
||||||
selected = false,
|
selected = false,
|
||||||
toggleSelect = () => {},
|
toggleSelect = () => {},
|
||||||
|
color,
|
||||||
}: FeatureCardProps) => {
|
}: FeatureCardProps) => {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
padding='10px'
|
padding='10px'
|
||||||
background='white'
|
background='white'
|
||||||
boxShadow='1px 1px 10px rgba(50, 59, 105, 0.25)'
|
boxShadow='1px 1px 10px rgba(50, 59, 105, 0.25)'
|
||||||
border={selected ? '2px solid #3CC13B' : undefined}
|
border={
|
||||||
|
selected
|
||||||
|
? `2px solid ${color ? theme.colors[color].main : '#3CC13B'}`
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
onClick={selectable ? toggleSelect : () => {}}
|
onClick={selectable ? toggleSelect : () => {}}
|
||||||
display='grid'
|
display='grid'
|
||||||
gridTemplateRows='auto'
|
gridTemplateRows='auto'
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import FrontendFeatureCard from './FrontendFeatureCard';
|
|||||||
import BackendFeatureCard from './BackendFeatureCard';
|
import BackendFeatureCard from './BackendFeatureCard';
|
||||||
import Specification from './Specification';
|
import Specification from './Specification';
|
||||||
import Chip from './Chip';
|
import Chip from './Chip';
|
||||||
|
import CategoryCard from './CategoryCard';
|
||||||
|
import TemplateCard from './TemplateCard';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Button,
|
Button,
|
||||||
@@ -56,4 +58,6 @@ export {
|
|||||||
BackendFeatureCard,
|
BackendFeatureCard,
|
||||||
Specification,
|
Specification,
|
||||||
Chip,
|
Chip,
|
||||||
|
CategoryCard,
|
||||||
|
TemplateCard,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user