diff --git a/new-docs/pages/patterns/icon.stories.mdx b/new-docs/pages/patterns/icon.stories.mdx new file mode 100644 index 00000000..69420972 --- /dev/null +++ b/new-docs/pages/patterns/icon.stories.mdx @@ -0,0 +1,127 @@ +import { Button } from '../../../core/src'; +import { RiSearchLine } from "react-icons/ri"; + +# Icon + +Moai doesn't have a built-in icon set. Instead, Moai's components work with any +SVG icons. This means you can use Moai with popular icon sets, like +[FontAwesome][1] and [Material Icons][2], or even with [your own icons][4]. + +This guide covers the usage of icons inside Moai's components (like in buttons +and inputs). To display an icon on its own, with the control of its size and +color, see the [Icon component][3]. + +[1]: https://fontawesome.com +[2]: https://fonts.google.com/icons +[3]: /components/icon +[4]: /patterns/icon/advanced + +## Basic + +Moai components that support icons usually have an \`icon\` prop. The +recommended way to set this prop is using an icon from the [react-icons][1] +package. It provides icons from many popular sets that can be used directly in +Moai: + +~~~ts +import { RiSearchLine } from "react-icons/ri"; +~~~ + +[1]: https://react-icons.github.io/react-icons/ + +