Skip to content

Commit

Permalink
docs(ColorPage): table of colors
Browse files Browse the repository at this point in the history
  • Loading branch information
VadymBezpalko committed Jan 26, 2024
1 parent 40797d5 commit a2c1653
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as React from 'react';

import { handleCopyText } from '../../helpers';

import { ColorShape } from './types';

import '../../components/Table/Table.css';
Expand All @@ -9,11 +11,6 @@ interface IColorTableProps {
}

export const ColorTable: React.FC<IColorTableProps> = ({ data }) => {
const handleCopyText = (text: string): void => {
void navigator.clipboard.writeText(text);
alert(`"${text}" copied to clipboard`);
};

return (
<table className="sb-unstyled">
<thead>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, Canvas } from '@storybook/addon-docs';
import { Shadow } from '../components/Shadow/Shadow';
import { ShadowExamples } from '../components/Shadow/ShadowExamples';
import { Shadow } from '../../components/Shadow/Shadow';
import { ShadowExamples } from '../../components/Shadow/ShadowExamples';

<Meta title="Foundations/Shadow" />

Expand Down
Empty file.
4 changes: 4 additions & 0 deletions packages/react-components/src/docs/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const handleCopyText = (text: string): void => {
void navigator.clipboard.writeText(text);
alert(`"${text}" copied to clipboard`);
};

0 comments on commit a2c1653

Please sign in to comment.