diff --git a/packages/components/icon/README.mdx b/packages/components/icon/README.mdx index ee076f5124..063fa327bb 100644 --- a/packages/components/icon/README.mdx +++ b/packages/components/icon/README.mdx @@ -28,7 +28,7 @@ Forma 36 provides a list of built-in icons that can be used as regular React com The icon components can be configured in different ways using variations in color and size: -```jsx file=./examples/IconVariantsExample.tsx +```jsx file=./examples/IconColorsExample.tsx ``` diff --git a/packages/components/icon/examples/IconColorsExample.tsx b/packages/components/icon/examples/IconColorsExample.tsx new file mode 100644 index 0000000000..4e4438377d --- /dev/null +++ b/packages/components/icon/examples/IconColorsExample.tsx @@ -0,0 +1,18 @@ +import * as React from 'react'; +import { CalendarBlankIcon } from '@contentful/f36-icons'; +import { Flex } from '@contentful/f36-components'; +import tokens from '@contentful/f36-tokens'; + +export default function IconColorsExample() { + return ( + + + + + +
+ +
+
+ ); +} diff --git a/packages/components/icon/examples/IconSizesExample.tsx b/packages/components/icon/examples/IconSizesExample.tsx index c10c474fda..d7fe5f6a4f 100644 --- a/packages/components/icon/examples/IconSizesExample.tsx +++ b/packages/components/icon/examples/IconSizesExample.tsx @@ -1,24 +1,18 @@ import * as React from 'react'; -import { CalendarIcon } from '@contentful/f36-icons'; +import { CalendarBlankIcon } from '@contentful/f36-icons'; import { Stack, Flex, Text } from '@contentful/f36-components'; export default function IconSizesExample() { return ( - Tiny + Tiny - Small + Small - Medium - - - Large - - - Extra large + Medium ); diff --git a/packages/components/icon/examples/IconVariantsExample.tsx b/packages/components/icon/examples/IconVariantsExample.tsx deleted file mode 100644 index ebe9f37584..0000000000 --- a/packages/components/icon/examples/IconVariantsExample.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import * as React from 'react'; -import { CalendarIcon } from '@contentful/f36-icons'; -import { Stack, Flex, Text } from '@contentful/f36-components'; - -export default function IconVariantsExample() { - return ( - - - - - {' '} - Primary - - - - - {' '} - Positive - - - - - {' '} - Negative - - - - - {' '} - Warning - - - - - {' '} - Secondary - - - - - {' '} - Muted - - - - - {' '} - White - - - ); -}