Skip to content

Commit

Permalink
Add more information to README
Browse files Browse the repository at this point in the history
Add icon and iconset configuration.
Add a note about grammar: issue cakecatz#105
  • Loading branch information
tjapro committed Oct 2, 2017
1 parent 2a7b635 commit f5c1fe2
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,44 @@ type `Flex Tool Bar: Edit Config File` in the Atom command palette.

- multiple callback
- function callback
- button icons
- inline button styles
- add class(s) to buttons
- hide/disable a button in certain cases

### Button Icon

The defult iconset is [Octicons](https://octicons.github.com/) (Atom's flavour).

Example:
```coffeescript
{
type: 'button'
tooltip: 'New File'
callback: 'application:new-file'
icon: 'file-add'
}
```

But you can specify the following iconsets:
- [Ionicons](http://ionicons.com) (`ion`)
- [FontAwesome](http://fortawesome.github.io/Font-Awesome) (`fa`)
- [Foundation](http://zurb.com/playground/foundation-icon-fonts-3) (`fi`)
- [IcoMoon](https://icomoon.io) (`icomoon`)
- [Devicon](http://devicon.fr) (`devicon`)
- [MaterialDesignIcons](https://materialdesignicons.com/) (`mdi`)

Example:
```coffeescript
{
type: 'button'
tooltip: 'Save File'
callback: 'core:save'
icon: 'floppy-o'
iconset: 'fa'
}
```

### Button style

You can use CSS styles per button.
Expand Down Expand Up @@ -91,6 +125,8 @@ callback: target ->
You can hide or disable buttons when a certain grammar is
used in the active file or a specified file is matched.

> If you don't know what language to use, see this [issue](https://github.com/cakecatz/flex-toolbar/issues/105).
If you set `disable` (`show`, `hide` or `enable`) this way:

```coffeescript
Expand Down Expand Up @@ -141,7 +177,9 @@ show: "Markdown"

This is same above.

### .cson Example
### Examples

#### .cson Example

```coffeescript
[
Expand Down Expand Up @@ -191,7 +229,7 @@ This is same above.
]
```

### .coffee Example
#### .coffee Example

```coffeescript
module.exports = [
Expand Down

0 comments on commit f5c1fe2

Please sign in to comment.