Skip to content

Instantly share code, notes, and snippets.

View d88naimi's full-sized avatar

David Naimi d88naimi

View GitHub Profile
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import React, { useState, useEffect } from "react";
import cx from "classnames";
import { Button } from "../Button";
import styles from "./Drawer.less";
export var Drawer = /*#__PURE__*/React.memo(function Drawer(props) {
var _useState = useState(Boolean(props.open)),
_useState2 = _slicedToArray(_useState, 2),
open = _useState2[0],
setOpen = _useState2[1];
import React from "react";
import cx from "classnames";
import { CopyButton } from "../CopyButton";
import styles from "./CopyInput.less";
export const CopyInput = (props) => {
return (
import React from "react";
import styles from "./ButtonGroup.less";
import cx from "classnames";
export function ButtonGroup(props) {
let opts = {
className: cx(styles.ButtonGroup, props.className)
};
return (
<div {...opts}>
@d88naimi
d88naimi / ButtonGroup.js
Created September 7, 2021 18:26
ButtonGroup.js
<ButtonGroup>
<Button text="Button 1" />
<Button text="Button 2" />
<Button text="Button 3" />
</ButtonGroup>
<br />
<ButtonGroup>
<Button type="cancel" text="Cancel" />
<Button type="save" text="Save" />
</ButtonGroup>
import React, { useState, useEffect } from "react";
import cx from "classnames";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faClipboard, faCheck } from "@fortawesome/free-solid-svg-icons";
import { Button } from "../Button";
import styles from "./CopyButton.less";
import React, { useState, useEffect } from "react";
import cx from "classnames";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faClipboard, faCheck } from "@fortawesome/free-solid-svg-icons";
import { Button } from "../Button";
import styles from "./CopyChip.less";
import React, { Component } from "react";
import cx from "classnames";
import omit from "lodash/omit";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faSearch } from "@fortawesome/free-solid-svg-icons";
import { Input } from "../Input";