Skip to content

Instantly share code, notes, and snippets.

View example2.jsx
import styled from 'styled-components';
const breakpoints = {
xs: '576px',
sm: '768px',
md: '992px',
lg: '1200px',
};
View example1.jsx
import styled, { css } from 'styled-components';
const breakpoints = {
xs: '576px',
sm: '768px',
md: '992px',
lg: '1200px',
};
View button.view.js
import React from 'react';
import classNames from 'classnames';
import { Link } from 'gatsby';
import styles from './button.module.scss';
export const Button = ({ className, tag = 'button', size, theme, children, ...attributes }) => {
const buttonRef = React.useRef(null);
const borderInnerGradientRef = React.useRef(null);
View rectangle.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View form-generator.formik.jsx
import * as React from 'react';
import { Formik } from 'formik';
import * as Yup from 'yup';
import CryptoJS from 'crypto-js';
import { FormGeneratorContainer } from './contact-form-form-generator.container';
export const FormGenerator = (props) => {
const { data: { formId, apiURL, formFields } } = props;
View offer.jsx
import * as React from 'react'
import { StickyContainer, Sticky } from 'react-sticky'
import { OfferSection, OfferSidebar, OfferInformationForm } from 'components/pages/offer'
import { Layout } from 'components/shared'
import { OfferPageContext } from 'context'
import { getWindowOuterWidth } from 'libs'
import { breakpoint } from 'variables'
// eslint-disable-next-line import/no-default-export
export default class extends React.Component {
View OfferInformationForm.js
import * as React from 'react'
import { navigate } from 'gatsby'
import { withFormik } from 'formik'
import * as Yup from 'yup'
import {
OfferInformationFormWrapper,
OfferInformationFormInner,
OfferInformationFormTitle,
OfferInformationFormSection,
OfferInformationFormSubtitle,
View sad.js
const generateMalwareMapPins = () => {
const malwareMapData = document.querySelector('.malware-map__data');
const malwareMapDataAsJSON = malwareMapData.dataset.malwareMapData;
const malwareMapDataAsArray = JSON.parse(malwareMapDataAsJSON);
const sortedMalwareMapData = malwareMapDataAsArray.sort((malwareMapDataItem1, malwareMapDataItem2) => {
return malwareMapDataItem1.countryName < malwareMapDataItem2.countryName ? -1 : 1;
});
if (malwareMapDataAsArray.length > 0) {
const malwareMapWrapper = document.querySelector('.malware-map__map-wrapper');
View hi.js
require('dotenv').config();
const Telegraf = require('telegraf');
const Extra = require('telegraf/extra');
const Markup = require('telegraf/markup');
const bot = new Telegraf(process.env.BOT_TOKEN);
bot.action(/delete_message_(.+)/, (context) => {
const messageId = context.match[1];
context.deleteMessage(messageId);
});
View _products-list.scss
.products-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: -80px;
@include sm-down {
margin-bottom: -40px;
}