1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 19:49:37 +02:00

Added App Edit Functionality

This commit is contained in:
unknown 2021-05-22 17:03:32 +02:00
parent 28683e7511
commit 8813bf6181
6 changed files with 98 additions and 12 deletions

View file

@ -9,6 +9,7 @@ interface ComponentProps {
apps: App[];
pinApp: (id: number, isPinned: boolean) => void;
deleteApp: (id: number) => void;
updateAppHandler: (app: App) => void;
}
const AppTable = (props: ComponentProps): JSX.Element => {
@ -44,7 +45,11 @@ const AppTable = (props: ComponentProps): JSX.Element => {
onClick={() => deleteAppHandler(app)}>
<Icon icon='mdiDelete' />
</div>
<div className={classes.TableAction}><Icon icon='mdiPencil' /></div>
<div
className={classes.TableAction}
onClick={() => props.updateAppHandler(app)}>
<Icon icon='mdiPencil' />
</div>
<div className={classes.TableAction} onClick={() => props.pinApp(app.id, app.isPinned)}>
{app.isPinned? <Icon icon='mdiPinOff' color='var(--color-accent)' /> : <Icon icon='mdiPin' />}
</div>