Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import TextFieldButton from "./components/TextFieldButton"
- const appElement = document.getElementById('app')
- const textFieldBtn = new TextFieldButton()
- textFieldBtn.placeholder = 'Enter text here...'
- textFieldBtn.value = ''
- textFieldBtn.onInput = (value: string) => {
- console.log('Input event - value =', value)
- }
- textFieldBtn.onChange = (value: string) => {
- console.log('Change event - value =', value)
- }
- function renderApp() {
- if (appElement !== null) {
- appElement.innerHTML = ''
- textFieldBtn.render(appElement)
- }
- }
- renderApp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement