mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-14 13:13:59 +02:00
Team icons fix
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
import BuildingIcon from '../../icons/building.svg';
|
|
||||||
import UsersIcon from '../../icons/users.svg';
|
|
||||||
import type { TeamDocument } from './CreateTeamForm';
|
import type { TeamDocument } from './CreateTeamForm';
|
||||||
import { httpPut } from '../../lib/http';
|
import { httpPut } from '../../lib/http';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { NextButton } from './NextButton';
|
import { NextButton } from './NextButton';
|
||||||
|
import { BuildingIcon } from '../ReactIcons/BuildingIcon.tsx';
|
||||||
|
import { UsersIcon } from '../ReactIcons/UsersIcon.tsx';
|
||||||
|
|
||||||
export const validTeamTypes = [
|
export const validTeamTypes = [
|
||||||
{
|
{
|
||||||
value: 'company',
|
value: 'company',
|
||||||
label: 'Company',
|
label: 'Company',
|
||||||
icon: BuildingIcon.src,
|
icon: BuildingIcon,
|
||||||
description:
|
description:
|
||||||
'Track the skills and learning progress of the tech team at your company',
|
'Track the skills and learning progress of the tech team at your company',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'study_group',
|
value: 'study_group',
|
||||||
label: 'Study Group',
|
label: 'Study Group',
|
||||||
icon: UsersIcon.src,
|
icon: UsersIcon,
|
||||||
description:
|
description:
|
||||||
'Invite your friends or course-mates and track your learning progress together',
|
'Invite your friends or course-mates and track your learning progress together',
|
||||||
},
|
},
|
||||||
@@ -56,7 +56,7 @@ export function Step0(props: Step0Props) {
|
|||||||
teamSize: team.teamSize,
|
teamSize: team.teamSize,
|
||||||
linkedInUrl: team?.links?.linkedIn || undefined,
|
linkedInUrl: team?.links?.linkedIn || undefined,
|
||||||
}),
|
}),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (error || !response) {
|
if (error || !response) {
|
||||||
@@ -76,21 +76,20 @@ export function Step0(props: Step0Props) {
|
|||||||
{validTeamTypes.map((validTeamType) => (
|
{validTeamTypes.map((validTeamType) => (
|
||||||
<button
|
<button
|
||||||
key={validTeamType.value}
|
key={validTeamType.value}
|
||||||
className={`flex flex-grow flex-col items-center rounded-lg border px-5 pt-12 pb-10 ${
|
className={`flex flex-grow flex-col items-center rounded-lg border px-5 pb-10 pt-12 ${
|
||||||
validTeamType.value == selectedTeamType
|
validTeamType.value == selectedTeamType
|
||||||
? 'border-gray-400 bg-gray-100'
|
? 'border-gray-400 bg-gray-100'
|
||||||
: 'border-gray-300 hover:border-gray-400 hover:bg-gray-50'
|
: 'border-gray-300 hover:border-gray-400 hover:bg-gray-50'
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setSelectedTeamType(validTeamType.value)}
|
onClick={() => setSelectedTeamType(validTeamType.value)}
|
||||||
>
|
>
|
||||||
<img
|
{
|
||||||
key={validTeamType.value}
|
<validTeamType.icon
|
||||||
alt={validTeamType.label}
|
|
||||||
src={validTeamType.icon}
|
|
||||||
className={`mb-3 h-12 w-12 opacity-10 ${
|
className={`mb-3 h-12 w-12 opacity-10 ${
|
||||||
validTeamType.value === selectedTeamType ? 'opacity-100' : ''
|
validTeamType.value === selectedTeamType ? 'opacity-100' : ''
|
||||||
}`}
|
}`}
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
<span className="mb-2 block text-2xl font-bold">
|
<span className="mb-2 block text-2xl font-bold">
|
||||||
{validTeamType.label}
|
{validTeamType.label}
|
||||||
</span>
|
</span>
|
||||||
|
29
src/components/ReactIcons/BuildingIcon.tsx
Normal file
29
src/components/ReactIcons/BuildingIcon.tsx
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
type BuildingIconProps = {
|
||||||
|
className?: string;
|
||||||
|
};
|
||||||
|
export function BuildingIcon(props: BuildingIconProps) {
|
||||||
|
const { className } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
className={className}
|
||||||
|
>
|
||||||
|
<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z"></path>
|
||||||
|
<path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2"></path>
|
||||||
|
<path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2"></path>
|
||||||
|
<path d="M10 6h4"></path>
|
||||||
|
<path d="M10 10h4"></path>
|
||||||
|
<path d="M10 14h4"></path>
|
||||||
|
<path d="M10 18h4"></path>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
26
src/components/ReactIcons/UsersIcon.tsx
Normal file
26
src/components/ReactIcons/UsersIcon.tsx
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
type UsersIconProps = {
|
||||||
|
className?: string;
|
||||||
|
};
|
||||||
|
export function UsersIcon(props: UsersIconProps) {
|
||||||
|
const { className } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
className={className}
|
||||||
|
>
|
||||||
|
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="9" cy="7" r="4"></circle>
|
||||||
|
<path d="M22 21v-2a4 4 0 0 0-3-3.87"></path>
|
||||||
|
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
Reference in New Issue
Block a user