Skip to content

Instantly share code, notes, and snippets.

View ulises-codes's full-sized avatar

Ulises Himely ulises-codes

View GitHub Profile
@piuccio
piuccio / config.js
Last active November 16, 2020 15:05
Shared code to run local apollo server next to firebase functions
const gql = require('graphql-tag');
const { makeExecutableSchema } = require('graphql-tools');
const books = [
// ...
];
const typeDefs = gql`
# ...
`;
@joshdover
joshdover / ExtendedRichUtils.js
Last active July 30, 2021 12:58
Example of how to add metadata to blocks for handling text alignment correctly
import { Modifier, EditorState, RichUtils } from 'draft-js';
import getCurrentlySelectedBlock from './getCurrentlySelectedBlock';
export const ALIGNMENTS = {
CENTER: 'center',
JUSTIFY: 'justify',
LEFT: 'left',
RIGHT: 'right'
};