Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
binance-fiat-widget
Advanced tools
1. You are not on any trade or economic sanctions lists, such as the UN Security Council Sanctions list, designated as a “Specially Designated National” by OFAC (Office of Foreign Assets Control of the U.S. Treasury Department) or placed on the U.S. Comme
You are not on any trade or economic sanctions lists, such as the UN Security Council Sanctions list, designated as a “Specially Designated National” by OFAC (Office of Foreign Assets Control of the U.S. Treasury Department) or placed on the U.S. Commerce Department’s “Denied Persons List”.
You are not providing any restricted/prohibited business that could constitute illegal, unlawful activities
npm install binance-fiat-widget
<div id="widget"></div>
import {Widget} from 'binance-fiat-widget'
const options = {
locale: 'en',
width: 200,
theme: 'dark',
urlParmas: {
ref: '',
utm_source: ''
}
}
Widget('#widget', options)
el: selector
or DOM element
import {Widget, unloadWidget} from 'binance-fiat-widget'
const app = () => {
const t = useRef<HTMLDivElement>(null)
// or
// const t = document.querySelector('#test')
useEffect(() => {
if (t) {
Widget(t)
}
return () => unloadWidget()
}, [])
return (<div id="#test" ref={r}></div>)
}
<script src="https://bin.bnbstatic.com/static/js/ocbs/binance-fiat-widget.js"></script>
<div id="widget"></div>
const t = document.querySelector('#widget')
window.binanceFiatWidget.Widget(t)
options.locale: string
i18n
, nullable
, default: 'en'
opts: 'en'|'cn'|'tw'|'kr'|'ru'|'vn'|'it'|'es'|'de'|'fr'
, unsupported locale will fallback to english
options.width: number
width
, nullable
,
if width is not set, default is el.offsetWidth
range: 200
- 500
options.theme: string
theme
, nullable
, default: 'light'
opts: 'light' | 'dark'
options.urlParmas
options.urlParmas.ref: string
ref id
, nullable
options.urlParmas.utm_source: string
UTM source
, nullable
options.api_host: string
overlay getCoinListApi
, nullable
options.skeletonScreen: boolean
nullable
, default true
, show a placeholder widget
setXXX
setXXX
is the function to change Widget's characters, you can use it by chaining
likes jquery
, and you need to use render
to render it
const w = widget(container, opt)
w.setTheme('dark').setLocale('cn').render()
setTheme
change the theme
const w = widget(container, opt)
w.setTheme('dark').render()
setLocale
change the locale
const w = widget(container, opt)
w.setLocale('cn').render()
render
render the widget (after .setXXX()
is necessary)
const w = widget(container, opt)
w.setTheme('dark').render()
render will fetch api, so render
return a Promise
const w = widget(container, opt)
w.setTheme('dark').render().then(v => alert('has render'))
unloadWidget
remove the widget from page, maybe you will use it in React hooks to replace setXXX()
useEffect(() => {
if (t?.current) {
w = Widget(t.current, {
theme: theme
})
}
return () => unloadWidget()
}, [theme])
FAQs
# This project is now deprecated, we're now focussing on @binance/fiat-widget
The npm package binance-fiat-widget receives a total of 4 weekly downloads. As such, binance-fiat-widget popularity was classified as not popular.
We found that binance-fiat-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.