mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-12 09:31:07 +08:00
Added icon to product blob view
This commit is contained in:
parent
971d184697
commit
2551b1fb38
6 changed files with 36 additions and 68 deletions
26
src/Components/Icons/ProductIcon/ProductIcon.tsx
Normal file
26
src/Components/Icons/ProductIcon/ProductIcon.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import React from "react";
|
||||
|
||||
export interface props {
|
||||
size: number;
|
||||
color: string;
|
||||
}
|
||||
export default function ProductIcon(props: props) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={props.size + "vh"}
|
||||
height={props.size + "vh"}
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="2"
|
||||
stroke={props.color}
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M7.05 11.293l4.243 -4.243a2 2 0 0 1 2.828 0l2.829 2.83a2 2 0 0 1 0 2.828l-4.243 4.243a2 2 0 0 1 -2.828 0l-2.829 -2.831a2 2 0 0 1 0 -2.828z"></path>
|
||||
<path d="M16.243 9.172l3.086 -.772a1.5 1.5 0 0 0 .697 -2.516l-2.216 -2.217a1.5 1.5 0 0 0 -2.44 .47l-1.248 2.913"></path>
|
||||
<path d="M9.172 16.243l-.772 3.086a1.5 1.5 0 0 1 -2.516 .697l-2.217 -2.216a1.5 1.5 0 0 1 .47 -2.44l2.913 -1.248"></path>
|
||||
</svg>
|
||||
);
|
||||
}
|
|
@ -2,6 +2,7 @@ import * as React from "react";
|
|||
|
||||
import styles from "../../../styles";
|
||||
import { ProductList } from "../../../Interfaces/Interfaces";
|
||||
import ProductIcon from "../../Icons/ProductIcon/ProductIcon";
|
||||
|
||||
export default function BlobView({ Products }: ProductList) {
|
||||
return (
|
||||
|
@ -19,7 +20,11 @@ export default function BlobView({ Products }: ProductList) {
|
|||
padding: 16,
|
||||
}}
|
||||
>
|
||||
<p style={styles.text}>{row.name}</p>
|
||||
<div style={styles.content_row}>
|
||||
<ProductIcon size={4} color="white" />{" "}
|
||||
<p style={styles.text}>{row.name}</p>
|
||||
</div>
|
||||
|
||||
<p style={styles.text}>ID: {row.id}</p>
|
||||
<p style={styles.text_small}>Last Modified: {row.last_modified}</p>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue