import React from "react"; import { SimpleTable } from "../../components/SimpleTable"; import { tokens } from "../../style-dictionary/dist/tokens"; import { Tooltip } from "../../components/Tooltip"; import { BUTTON_VARIANT, Button } from "../../components/Button"; import { ICON_TYPE } from "../../components/Icon"; export const categories = Object.keys(tokens); export const copyToClipboard = (text: string) => { navigator.clipboard.writeText(text); }; export const titleize = (string: string) => { const title = string.replace(/([A-Z])/g, " $1").toLowerCase(); return `${title.charAt(0).toUpperCase()}${title.slice(1)}`; }; export const Table = ({ children, columns }: any) => ( {columns.map((column: any) => ( {column} ))} {children} ); export const TableFull = ({ children, columns }: any) => ( {columns && ( {columns.map((column: any, i: number) => ( {column} ))} )} {children} ); export const Row = ({ children, style }: any) => ( {children} ); export const Cell = ({ children, ...rest }: any) => ( {children} ); export const ClickToCopy = ({ text }: any) => { const [copied, setCopied] = React.useState(false); const renderProps = { onMouseOut: () => setCopied(false), onBlur: () => setCopied(false), onClick: () => { copyToClipboard(text); setCopied(true); }, }; return ( } > {copied ? "Copied!" : "Copy token path"} ); }; export const Swatch = ({ color }: any) => (
);