Skip to content

Instantly share code, notes, and snippets.

View youssof707's full-sized avatar
๐Ÿš€

Youssof Fahmy youssof707

๐Ÿš€
View GitHub Profile
@youssof707
youssof707 / createAccountExpress.js
Created May 6, 2021 21:42
Create account example
app.post('/api/Accounts/Create', async (req, res)=>{
try {
const user = await admin.auth().createUser({
email: req.body.email,
password: req.body.password,
displayName: req.body.name,
})
@youssof707
youssof707 / NestSearch.jsx
Last active October 24, 2020 22:17
TPUI SearchBar nest demo
function NestTest(props){
return<div>
{'I am searching for: ' + props.searchBarValue}
</div>
}
function CustomBar(props){
@youssof707
youssof707 / CB.js
Created October 9, 2020 15:46
ConfirmButton Example
<ConfirmButton
content = {<span><FontAwesomeIcon icon={faTimes}/> Click</span>}
expandedContent = 'Are you sure'
onClick = {()=>{console.log('button')}}
/>
@youssof707
youssof707 / Popups.js
Created September 14, 2020 14:42
TouchPoint UI Popups Example
import {PopupCard, FreeButton, useSystem} from 'touchpoint-ui'
function PopButton(){
const {Popup} = useSystem()
function clickHandler(){
Popup.open(<PopupCard title ='TouchPoint UI'>
Hello there!
</PopupCard>)
@youssof707
youssof707 / FreeButton.js
Last active September 14, 2020 14:21
TouchPoint UI FreeButton Example
<div>
<FreeButton purpose='positive' style={{margin:'10px'}}>Positive</FreeButton>
<FreeButton purpose='negative' style={{ margin: '10px' }}>Negative</FreeButton>
<FreeButton style={{ margin: '10px' }}>Default</FreeButton>
<FreeButton locked style={{ margin: '10px' }}>Default</FreeButton>
</div>
@youssof707
youssof707 / SearchTable.js
Created September 14, 2020 13:56
TouchPoint UI Searchable Table Example
<div>
<SearchBar/>
<MainTable
searchable
headers={[
{headerID: 'name', displayName: 'Name', width: 250},
{headerID: 'carMake', displayName: 'Car Make', width: 200},
@youssof707
youssof707 / Radio.js
Created September 14, 2020 01:12
TouchPoint UI RadioGroup Exampls
function Demo(props){
const [chosenOne, setChosenOne] = useState(1)
return <RadioGroup value={chosenOne} onChange={setChosenOne}>
<RadioButton value = {1}>Option 1</RadioButton>
<RadioButton value = {2}>Option 2</RadioButton>
<RadioButton value = {3}>Option 3</RadioButton>
<RadioButton value = {4}>Option 4</RadioButton>
@youssof707
youssof707 / ComboBox.js
Last active September 14, 2020 01:24
TouchPoint UI ComboBox Example
<ComboBox style={{width: 200}}>
<option value='R'>Red</option>
<option value='B'>Blue</option>
<option value='G'>Green</option>
</ComboBox>
@youssof707
youssof707 / TextBox.js
Created September 14, 2020 00:27
TouchPoint UI Textbox
function TextBoxDemo(props){
const [textValue, setTextValue] = useState('hello!')
return(<div>
<h5>TextBox Says {textValue}</h5>
<TextBox onChange={(e)=>setTextValue(e.target.value)} value = {textValue}/>
</div>)
}
@youssof707
youssof707 / Bar.js
Created September 12, 2020 22:18
TouchPoint ControlBar Example
<ControlBar style={{borderRadius: '10px'}} searchBar>
<CoreButton>Buttons</CoreButton>
<CoreButton>More Buttons</CoreButton>
</ControlBar>