aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/recipes/RecipeItem.tsx
diff options
context:
space:
mode:
authorLibravatar Nathanaƫl Houn <contact@nathanaelhoun.fr>2022-05-15 23:42:36 +0200
committerLibravatar GitHub <noreply@github.com>2022-05-15 23:42:36 +0200
commited2e034b12b15c5b4ac638e6b89a4ee9a7ed5012 (patch)
treee51d99224a111a02e9ce0f39ea9762387be2950a /src/components/settings/recipes/RecipeItem.tsx
parentExtracted ImageHelper and ImageController from ServiceController for reuse (diff)
downloadferdium-app-ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012.tar.gz
ferdium-app-ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012.tar.zst
ferdium-app-ed2e034b12b15c5b4ac638e6b89a4ee9a7ed5012.zip
fix: revert "Typescript conversion" (#153)
Diffstat (limited to 'src/components/settings/recipes/RecipeItem.tsx')
-rw-r--r--src/components/settings/recipes/RecipeItem.tsx32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/components/settings/recipes/RecipeItem.tsx b/src/components/settings/recipes/RecipeItem.tsx
deleted file mode 100644
index 1dfe88683..000000000
--- a/src/components/settings/recipes/RecipeItem.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
1import { Component } from 'react';
2import { observer } from 'mobx-react';
3
4import RecipePreviewModel from '../../../models/RecipePreview';
5
6type Props = {
7 recipe: RecipePreviewModel;
8 onClick: () => {};
9};
10
11class RecipeItem extends Component<Props> {
12 render() {
13 const { recipe, onClick } = this.props;
14
15 return (
16 <button type="button" className="recipe-teaser" onClick={onClick}>
17 {recipe.isDevRecipe && (
18 <span className="recipe-teaser__dev-badge">dev</span>
19 )}
20 <img src={recipe.icon} className="recipe-teaser__icon" alt="" />
21 <span className="recipe-teaser__label">{recipe.name}</span>
22 {recipe.aliases && recipe.aliases.length > 0 && (
23 <span className="recipe-teaser__alias_label">
24 {`Aliases: ${recipe.aliases.join(', ')}`}
25 </span>
26 )}
27 </button>
28 );
29 }
30}
31
32export default observer(RecipeItem);