cv/src/app/components/Skills.tsx

33 行
1.3 KiB
TypeScript
Raw 通常表示 履歴

2023-06-03 12:04:22 +00:00
import React, { ReactNode, useContext } from 'react';
2023-05-24 19:15:53 +00:00
import Container from 'react-bootstrap/Container';
2023-05-27 03:25:48 +00:00
import { PersonContext } from '../hooks/PersonContext';
2023-05-24 19:15:53 +00:00
import TagCloud from './TagCloud';
2023-06-03 05:09:55 +00:00
import { Col, Row } from 'react-bootstrap';
2023-05-24 19:15:53 +00:00
2023-06-03 05:09:55 +00:00
function SkillsCol(props: { children: ReactNode }) {
return <Col xs={12} sm={6} lg={12}>{props.children}</Col>
}
2023-05-24 19:15:53 +00:00
export default function Skills() {
const person = useContext(PersonContext)
return (
<Container className='skills' fluid>
2023-05-24 19:15:53 +00:00
<h2>Skills</h2>
2023-06-03 05:09:55 +00:00
<Row>
<SkillsCol><TagCloud title='Main' icon='bookmark-star' style='primary' tags={person.skills.primary} /></SkillsCol>
{person.skills.secondary && (
<SkillsCol><TagCloud title='Support' icon='bookmark-plus' tags={person.skills.secondary} /></SkillsCol>
)}
2023-05-26 03:49:37 +00:00
{person.skills.languages && (
2023-06-03 05:09:55 +00:00
<SkillsCol><TagCloud title='Languages' icon='bookmarks' tags={person.skills.languages} /></SkillsCol>
2023-05-26 03:49:37 +00:00
)}
{person.skills.others && (
2023-06-03 05:09:55 +00:00
<SkillsCol><TagCloud title='Others' icon='bookmark' tags={person.skills.others} /></SkillsCol>
)}
{person.interests && (
2023-06-03 05:09:55 +00:00
<SkillsCol><TagCloud title='Interests' icon='bookmark-heart' style='light' tags={person.interests} /></SkillsCol>
)}
2023-06-03 05:09:55 +00:00
</Row>
2023-05-24 19:15:53 +00:00
</Container>
)
}