added PopupButton component

This commit is contained in:
Anton 2024-01-06 13:37:05 +01:00
parent 33b340b6bb
commit ac63672290

View File

@ -0,0 +1,11 @@
import * as React from 'react'
import { Link } from 'react-router-dom'
import { getValue } from '../../../../Utils/GetValue'
import { Item } from '../../../../types'
export const PopupButton = ({url, parameter, text, color, item} : {url: string, parameter: string, text: string, color : string, item? : Item}) => {
return (
<Link to={`${url}/${getValue(item,parameter)}`}><button style={{backgroundColor: getValue(item,color)}} className="tw-btn tw-text-white tw-btn-sm tw-float-right -tw-mt-2">{text}</button></Link>
)
}