Skip to content

Commit d425a98

Browse files
committed
feat(stacktext): add new component StackText
1 parent ba84ed8 commit d425a98

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

src/components/ProjectText.tsx

Whitespace-only changes.

src/components/StackText.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
3+
import './styles/StackText.css';
4+
import { IconsData } from '../hooks/useGithubAutomatedRepos';
5+
6+
type Props = {
7+
itemText: string;
8+
className?: string;
9+
};
10+
export function StackText({ itemText, className = 'styleStackText' }: Props) {
11+
const { projectIcons } = IconsData();
12+
return itemText === 'deploy' || projectIcons[itemText as never] ? <> </> : <p className={className}>{itemText}</p>;
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.styleStackText {
2+
width: 85px;
3+
padding: 5px;
4+
border-radius: 10px;
5+
background-color: #888;
6+
}

src/hooks/useGithubAutomatedRepos.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
// https://www.svgrepo.com/svg/456864/diagram
1515
// https://www.svgrepo.com/svg/455166/map-navigation?edit=true
1616
// https://www.svgrepo.com/svg/343466/news-feed?edit=true
17+
// https://www.svgrepo.com/svg/458454/database-1?edit=true
1718

1819
import { useEffect, useState } from 'react';
1920

20-
// https://www.svgrepo.com/svg/458454/database-1?edit=true
2121
export interface IGithubRepos {
2222
name: string;
2323
topics: [];

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export { ProjectIcons } from './components/ProjectIcons';
22
export { StackIcons } from './components/StackIcons';
3+
export { StackText } from './components/StackText';
34
export { IGithubRepos, useGithubAutomatedRepos, IconsData } from './hooks/useGithubAutomatedRepos';

0 commit comments

Comments
 (0)