Update components

This commit is contained in:
Hazem Krimi
2021-06-15 02:04:59 +01:00
parent bdce2223cc
commit 2b99eed257
2 changed files with 12 additions and 1 deletions
+8 -1
View File
@@ -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'
+4
View File
@@ -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,
}; };