Skip to content

Instantly share code, notes, and snippets.

View ever-dev's full-sized avatar
🏠
Working from home

Ever Dev ever-dev

🏠
Working from home
View GitHub Profile
@ever-dev
ever-dev / CustomCircularProgress
Last active January 13, 2020 02:56
Customize the Circular Progress of the component from Material UI to accept color and size and put it the center of the screen.
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { CircularProgress } from '@material-ui/core';
const defaultSize = 50;
class ColoredCircularProgressComponent extends Component {
render() {
const { classes, size } = this.props;
/** @jsx jsx */
import { jsx } from '@emotion/core'
import { FunctionComponent, HTMLAttributes, useMemo, useState, useEffect } from 'react'
import Calendar from 'react-calendar/dist/entry.nostyle'
import dayjs from 'dayjs'
import { Icon, Button, Clickover, Text } from '~/components'
import { styles } from './styles'
// @ts-ignore
from django.contrib import admin
from .models import (
Item, OrderItem, Order, Payment, Coupon, Refund,
Address, UserProfile, Variation, ItemVariation
)
def make_refund_accepted(modeladmin, request, queryset):
queryset.update(refund_requested=False, refund_granted=True)
from django_countries import countries
from django.db.models import Q
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from django.shortcuts import render, get_object_or_404
from django.utils import timezone
from rest_framework.generics import (
ListAPIView, RetrieveAPIView, CreateAPIView,
UpdateAPIView, DestroyAPIView
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Row, Col, Card } from 'antd'
import { Color } from 'utils'
import { Page, ScrollBar } from 'components'
import {
NumberCard,
Quote,
Sales,
import React, {
createContext,
useEffect,
useState,
useContext,
useCallback,
Fragment
} from "react";
import { ScrollView } from "react-native";
import { Portal, Dialog, List, Button } from "react-native-paper";
@ever-dev
ever-dev / RaisedButton.js
Last active October 20, 2019 22:28
React-Native RaisedButton code.
import React, { Component, PropTypes } from 'react';
import {
View,
Text,
Animated,
} from 'react-native';
import Button from '../internal/Button';
import Icon from '../Icon';