Skip to content

Commit

Permalink
fix: Formatting in icon section
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Leeds committed Jan 21, 2020
1 parent 1b0c174 commit 5158fa1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions docs/markdown/7-Icons.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Default icons are selected from [Font Awesome](https://fontawesome.com/) for controls and file types. These icons can be customized in two different ways:

1. You can pass a map to override the default icons with alternatives from Font Awesome. You'll need to install the Font Awesome package that contains your desired icon.
### Custom Icon Map

You can pass a map to override the default icons with alternatives from Font Awesome. You'll need to install the Font Awesome package that contains your desired icon.

```bash
npm install @fortawesome/free-brands-svg-icons
Expand All @@ -14,7 +16,9 @@ import { faCodepen } from '@fortawesome/free-brands-svg-icons';
<FileBrowser icons={{ code: faCodepen }}>
```

2. You can implement a whole new `Icon` component to render icons, that accepts icons from your custom map of icons. Remember that by default, the map will contain Font Awesome ligatures. Your `Icon` component should implement the following `IconProps` props, based on a subset of `FontAwesomeIcon`.
### Custom Icon Component w/ Map

You can implement a whole new `Icon` component to render icons, that accepts icons from your custom map of icons. Remember that by default, the map will contain Font Awesome ligatures. Your `Icon` component should implement the following `IconProps` props, based on a subset of `FontAwesomeIcon`.

```typescript
export interface IconProps {
Expand All @@ -40,7 +44,7 @@ Your icon component will be called wherever an icon exists in the UI:
<Icon icon={icons.code} />
```

Available icons are:
### Available Icons

- checkActive
- checkInactive
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
</head>
<body>
<div id="rsg-root"></div>
<script src="build/bundle.f3460833.js"></script>
<script src="build/bundle.c95179d5.js"></script>
</body>
</html>

0 comments on commit 5158fa1

Please sign in to comment.