Skip to content

Commit

Permalink
docs(website): add example @ CodeSandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed May 28, 2018
1 parent 668bd91 commit 3935f6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/ExtendingStyles.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const BorderedButton = Button.extend`
;<BorderedButton variant="primary">A button with border!</BorderedButton>
```

πŸ‘‰ **[Checkout the interactive example on CodeSandbox](https://codesandbox.io/s/7k8o4x7lj6)**

#### Extend components deeply

Some components are more complex than a `Button`. The `Switch` for an example is a component that includes several elements: a container, a ball... All of these elements have their own classes. To extend it, just use the browser inspector, pick the class and override it πŸ‘Œ.
Expand Down
2 changes: 2 additions & 0 deletions docs/UseAnotherComponent.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const LinkButton = Button.withComponent('a')
</LinkButton>
```

πŸ‘‰ **[Checkout the interactive example on CodeSandbox](https://codesandbox.io/s/7k8o4x7lj6)**

#### Dynamic approach using `component` property

Every components accept a `component` property, it defines the base component used in each component.
Expand Down

0 comments on commit 3935f6a

Please sign in to comment.