This file contains hidden or 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
| orbs: | |
| chromatic: wave/[email protected] | |
| workflows: | |
| approval: | |
| - ready: | |
| type: approval | |
| filters: | |
| branches: | |
| ignore: master |
This file contains hidden or 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
| /* | |
| * This forces you to have at least one of : isReadOnly, isDisabled, or onChange | |
| */ | |
| import React from "react"; | |
| interface ContainsReadonly { | |
| isReadOnly: boolean; | |
| } |
This file contains hidden or 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 clearAll = obj => { | |
| const clearMock = member => { | |
| member.mockClear && member.mockClear() | |
| } | |
| Object.keys(obj).forEach(key => clearMock(obj[key])); | |
| } |
This file contains hidden or 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
| // protobuf | |
| // model.proto | |
| syntax = "proto3"; | |
| package model; | |
| message Collection { | |
| optional string id = 1; | |
| optional string name = 2; | |
| optional string description = 3; |
This file contains hidden or 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 Resumitable = props => ( | |
| <WaveButton | |
| isDisabled={props.isResubmitting} | |
| isLoading={props.isResubmitting} | |
| type={WaveButtonTypes.SECONDARY} | |
| onClick={props.onClick} > | |
| {props.text} | |
| </WaveButton> | |
| ) |
This file contains hidden or 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 A = () => <h1> Foo </h1> | |
| const B = () => <h1> Bar </h1> | |
| const AorB = props => props.isBusinessOwner ? <A> : <B>; | |
| const Parent = props => ( | |
| <div> | |
| Haaaaay!!! | |
| <AorB isBusinessOwner={props.isBusinessOwner}/> | |
| </div> | |
| ) |
This file contains hidden or 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 getRegexCaptures = (regex, string) => { | |
| const getMatches = (cursor, results = []) => { | |
| const exp = regex.exec(string); | |
| if (!exp) { | |
| return results; | |
| } | |
| return getMatches(exp, [...results, exp[1]]); | |
| }; | |
| return getMatches(); | |
| }; |