diff --git a/src/elements/Preview/Preview.tsx b/src/elements/Preview/Preview.tsx index 2742651..b185836 100644 --- a/src/elements/Preview/Preview.tsx +++ b/src/elements/Preview/Preview.tsx @@ -4,6 +4,9 @@ import {Spinner} from 'react-bootstrap'; import {Link} from 'react-router-dom'; import GlobalInfos from '../../utils/GlobalInfos'; import {callAPIPlain} from '../../utils/Api'; +import {faEllipsisV} from '@fortawesome/free-solid-svg-icons'; +import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import QuickActionPop from '../QuickActionPop/QuickActionPop'; interface PreviewProps { name: string; @@ -12,6 +15,7 @@ interface PreviewProps { interface PreviewState { previewpicture: string | null; + optionsvisible: boolean; } /** @@ -23,7 +27,8 @@ class Preview extends React.Component { super(props); this.state = { - previewpicture: null + previewpicture: null, + optionsvisible: false }; } @@ -38,9 +43,16 @@ class Preview extends React.Component { render(): JSX.Element { const themeStyle = GlobalInfos.getThemeStyle(); return ( - -
-
{this.props.name}
+
+
this.setState({optionsvisible: true})}> + +
+ {this.popupvisible()} +
{this.props.name}
+
{this.state.previewpicture !== null ? { }
-
+ +
-
- - +
); } + + + popupvisible(): JSX.Element { + if (this.state.optionsvisible) + return (heeyyho); + else + return <>; + } } /** diff --git a/src/elements/QuickActionPop/QuickActionPop.tsx b/src/elements/QuickActionPop/QuickActionPop.tsx new file mode 100644 index 0000000..ec9ac67 --- /dev/null +++ b/src/elements/QuickActionPop/QuickActionPop.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import style from './QuickActionPopup.module.css' + +interface props{ + +} + +class QuickActionPop extends React.Component { + constructor(props: props) { + super(props); + + this.state = {}; + } + + render(): JSX.Element { + return ( +
+
{console.log('clicked');}}>testi
testi +
+ ); + } +} + +export default QuickActionPop; diff --git a/src/elements/QuickActionPop/QuickActionPopup.module.css b/src/elements/QuickActionPop/QuickActionPopup.module.css new file mode 100644 index 0000000..543b94c --- /dev/null +++ b/src/elements/QuickActionPop/QuickActionPopup.module.css @@ -0,0 +1,8 @@ +.quickaction { + background-color: white; + width: 90px; + height: 120px; + z-index: 2; + position: absolute; + +}