A react native form hook based on formik. shamelessly taken from Jarred (jaredpalmer/formik#1046)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="uk-form-icon"> | |
<i class="uk-icon-calendar"></i> | |
<input type="text" class="uk-width-1-1" ng-model="item.classified.meta.applyBy" data-uk-datepicker="{format:'DD.MM.YYYY'}" placeholder="{{ 'CLASSIFIED_CREATE_JOB_META_APPLYBY_DATE' | translate }}" /> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var module = angular.module('api.auth', [ | |
'angular-data.DS', | |
'ngCordova' | |
]); | |
module.constant('AUTH_EVENTS', { | |
loginSuccess: 'auth-login-success', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"directory": "vendor" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import StringEnum from './StringEnum'; | |
export const Intent = StringEnum(['success', 'warning', 'error', 'info']); | |
export type Intent = keyof typeof Intent; | |
/** | |
* This allows you to declare an enum that can be used a both a type and value, while still allowing the user to use plain strings. | |
* The option to use plain strings is good when you are developing a library that might be used in a none TS project. | |
* example | |
```` | |
const Message = (intent:Intent) => (message: string) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rawToken = "v83dtres"; | |
const checksum = Luhn.generate(rawToken); | |
const testToken = `${rawToken}${checksum}`; | |
const isValid = Luhn.validate(testToken); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Small */ | |
@media (max-width: @breakpoint-small-max) { | |
[class*='uk-push-small-'], | |
[class*='uk-pull-small-'] { position: relative; } | |
/* | |
* Push | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createContext } from 'react'; | |
import { ActionProps, FeatureConfig, FeatureState } from './feature.types'; | |
const dispatch = <Feature extends string | number>( | |
value: ActionProps<Feature> | |
) => {}; | |
export const createFeatureContext = <Feature extends string | number>( | |
features: FeatureState<Feature>, | |
config: FeatureConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Based on the 'replace text' hook found here: http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/ | |
// This hook should be placed in the 'after_prepare' hook folder. | |
// The hook relies on a JSON file located at '<project_root>/resources/.build.json' to track the build number. | |
// build.json content: | |
// {"build: 1} | |
// Add 'BUILDNR' to the version number in the '<project_root>/config.xml' file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DependencyList, useEffect, useReducer, useState } from "react"; | |
interface State<T> { | |
data: T | null; | |
error: unknown | null; | |
loading: boolean; | |
loaded: boolean; | |
} | |
type Action<T> = |
OlderNewer