mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
added PopupButton component
This commit is contained in:
parent
33b340b6bb
commit
ac63672290
@ -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>
|
||||
|
||||
)
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user